mirror of
https://github.com/archtechx/enums.git
synced 2025-12-12 14:14:05 +00:00
Fix PHP 8.4 deprecation for type declaration for default null value
This commit is contained in:
parent
37326d5e26
commit
558d859ab4
2 changed files with 2 additions and 1 deletions
|
|
@ -85,6 +85,7 @@ $rules = [
|
|||
'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,
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ trait Options
|
|||
* 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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue