diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 589838b..d813055 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -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, diff --git a/src/Options.php b/src/Options.php index 3700650..25e141f 100644 --- a/src/Options.php +++ b/src/Options.php @@ -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;