Skip to content

Commit

Permalink
Fix PHP 8.4 deprecation for type declaration for default null value (#25
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ejunker authored Oct 29, 2024
1 parent 37326d5 commit 27d0405
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.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
'no_whitespace_in_blank_line' => true,
'normalize_index_brace' => true,
'not_operator_with_successor_space' => true,
'nullable_type_declaration_for_default_null_value' => true,
'object_operator_without_whitespace' => true,
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'phpdoc_indent' => true,
Expand Down
2 changes: 1 addition & 1 deletion src/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static function options(): array
* Generate a string format of the enum options using the provided callback and glue.
* @param Closure(string $name, mixed $value): string $callback
*/
public static function stringOptions(Closure $callback = null, string $glue = '\n'): string
public static function stringOptions(?Closure $callback = null, string $glue = '\n'): string
{
$firstCase = static::cases()[0] ?? null;

Expand Down

0 comments on commit 27d0405

Please sign in to comment.