Skip to content

Commit

Permalink
Merge branch '5.4' into 6.3
Browse files Browse the repository at this point in the history
* 5.4:
  Fix implicitly-required parameters
  List CS fix in .git-blame-ignore-revs
  Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value
  [Messenger][AmazonSqs] Allow async-aws/sqs version 2
  • Loading branch information
nicolas-grekas committed Jan 23, 2024
2 parents fc47f10 + 887762a commit 4165961
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Section.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Section
* @param float|null $origin Set the origin of the events in this section, use null to set their origin to their start time
* @param bool $morePrecision If true, time is stored as float to keep the original microsecond precision
*/
public function __construct(float $origin = null, bool $morePrecision = false)
public function __construct(?float $origin = null, bool $morePrecision = false)
{
$this->origin = $origin;
$this->morePrecision = $morePrecision;
Expand Down
4 changes: 2 additions & 2 deletions Stopwatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function getSections(): array
*
* @throws \LogicException When the section to re-open is not reachable
*/
public function openSection(string $id = null)
public function openSection(?string $id = null)
{
$current = end($this->activeSections);

Expand Down Expand Up @@ -100,7 +100,7 @@ public function stopSection(string $id)
/**
* Starts an event.
*/
public function start(string $name, string $category = null): StopwatchEvent
public function start(string $name, ?string $category = null): StopwatchEvent
{
return end($this->activeSections)->startEvent($name, $category);
}
Expand Down
2 changes: 1 addition & 1 deletion StopwatchEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class StopwatchEvent
*
* @throws \InvalidArgumentException When the raw time is not valid
*/
public function __construct(float $origin, string $category = null, bool $morePrecision = false, string $name = null)
public function __construct(float $origin, ?string $category = null, bool $morePrecision = false, ?string $name = null)
{
$this->origin = $this->formatTime($origin);
$this->category = \is_string($category) ? $category : 'default';
Expand Down

0 comments on commit 4165961

Please sign in to comment.