From c4f19baa7e36926ec9067cb9cc657a416e04439d Mon Sep 17 00:00:00 2001 From: David Young Date: Tue, 25 Jul 2023 21:14:03 -0500 Subject: [PATCH] Updated PHP-CS-Fixer to not ignore PHP version now that PHP 8.2 is supported, fixed deprecated config rules (#36) --- .php-cs-fixer.dist.php | 3 +-- composer.json | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index d2e65bf..b73a19f 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -5,12 +5,10 @@ '@PSR12' => true, 'array_syntax' => ['syntax' => 'short'], 'blank_line_after_opening_tag' => true, - 'braces' => ['allow_single_line_closure' => true], 'compact_nullable_typehint' => true, 'concat_space' => ['spacing' => 'one'], 'declare_equal_normalize' => ['space' => 'none'], 'declare_strict_types' => true, - 'function_typehint_space' => true, 'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'], // A very tiny micro-optimization to reduce the number of opcodes for native function calls 'native_function_invocation' => ['include' => ['@all']], @@ -67,6 +65,7 @@ 'single_quote' => true, 'single_trait_insert_per_statement' => true, 'standardize_not_equals' => true, + 'type_declaration_spaces' => true ]) ->setRiskyAllowed(true) ->setFinder( diff --git a/composer.json b/composer.json index 8028eb8..1a8597f 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ }, "scripts": { "phpcs-test": "@phpcs-fix --dry-run", - "phpcs-fix": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix --config=.php-cs-fixer.dist.php -v --diff", + "phpcs-fix": "php-cs-fixer fix --config=.php-cs-fixer.dist.php -v --diff", "phpunit": "php vendor/phpunit/phpunit/phpunit --coverage-clover ./.coverage/clover.xml", "post-root-package-install": [ "php -r \"file_exists('.env') || copy('.env.dist', '.env');\""