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 5f28c58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
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 5f28c58

Please sign in to comment.