Skip to content

Commit

Permalink
Explicitly mark parameter as nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Apr 17, 2024
1 parent 9343fb7 commit c132676
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
operating-system:
- "ubuntu-latest"

Expand Down
1 change: 1 addition & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
'strict_param' => true,
'ternary_to_null_coalescing' => true,
'native_function_invocation' => ['include' => ['@compiler_optimized'], 'scope' => 'namespaced'],
'nullable_type_declaration_for_default_null_value' => true,
])
->setFinder($finder)
;
2 changes: 1 addition & 1 deletion src/DataCollector/MercureDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function __construct(iterable $hubs)
$this->hubs = $hubs;
}

public function collect(Request $request, Response $response, \Throwable $exception = null): void
public function collect(Request $request, Response $response, ?\Throwable $exception = null): void
{
$this->data = [
'count' => 0,
Expand Down

0 comments on commit c132676

Please sign in to comment.