diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 1aaac2d..223eac5 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -24,6 +24,7 @@ 'no_superfluous_phpdoc_tags' => true, 'no_trailing_comma_in_singleline' => true, 'no_unused_imports' => true, + 'nullable_type_declaration_for_default_null_value' => true, 'ordered_imports' => ['imports_order' => ['class', 'function', 'const'], 'sort_algorithm' => 'alpha'], 'phpdoc_add_missing_param_annotation' => ['only_untyped' => true], 'phpdoc_align' => ['align' => 'left'], diff --git a/composer.json b/composer.json index b052dc5..4421983 100644 --- a/composer.json +++ b/composer.json @@ -27,12 +27,12 @@ "php": "^8.1" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.51.0", - "phpstan/phpstan": "^1.10.59", + "friendsofphp/php-cs-fixer": "^3.52.1", + "phpstan/phpstan": "^1.10.64", "phpstan/phpstan-strict-rules": "^1.5.2", "phpstan/phpstan-phpunit": "^1.3.16", "phpstan/phpstan-deprecation-rules": "^1.1.4", - "phpunit/phpunit": "^10.5.11", + "phpunit/phpunit": "^10.5.15", "symfony/var-dumper": "^6.4.4" }, "autoload": { diff --git a/src/Enum/JavaScriptConverter.php b/src/Enum/JavaScriptConverter.php index bb6bf61..2311464 100644 --- a/src/Enum/JavaScriptConverter.php +++ b/src/Enum/JavaScriptConverter.php @@ -39,7 +39,7 @@ public static function new(): self ); } - public function propertyNameCase(Closure $casing = null): self + public function propertyNameCase(?Closure $casing = null): self { return new self( $this->useSymbol, diff --git a/src/Error/Cloak.php b/src/Error/Cloak.php index b4d6367..dc32113 100644 --- a/src/Error/Cloak.php +++ b/src/Error/Cloak.php @@ -103,7 +103,7 @@ public function __invoke(mixed ...$arguments): mixed /** * @throws ErrorException */ - protected function errorHandler(int $errno, string $errstr, string $errfile = null, int $errline = null): bool + protected function errorHandler(int $errno, string $errstr, ?string $errfile = null, ?int $errline = null): bool { if (ReportingLevel::fromEnv()->doesNotContain($errno)) { return false;