From 251ebc529c160cd0b390671804e8d7d28ce2717d Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Tue, 6 Dec 2022 22:15:12 +0100 Subject: [PATCH] Fix fn spacing rule, upgrade to the latest PHP-CS-Fixer and add a new rule --- CHANGELOG.md | 1 + composer.json | 2 +- composer.lock | 24 ++++++++++++------------ src/Rules.php | 2 ++ 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 584d126..4319259 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - `semicolon_after_instruction` fixer. - `types_spaces` fixer. - `no_trailing_comma_in_singleline` fixer. +- `no_useless_concat_operator` fixer. ### Changed - `friendsofphp/php-cs-fixer` version bumped to `^3`. diff --git a/composer.json b/composer.json index 1186313..598482f 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "homepage": "https://github.com/elyby/php-code-style", "require": { "php": "^7.4 || ^8.0", - "friendsofphp/php-cs-fixer": "^3.11" + "friendsofphp/php-cs-fixer": "^3.13" }, "require-dev": { "ergebnis/composer-normalize": "^2.28", diff --git a/composer.lock b/composer.lock index 4d96842..f72755a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "607064616a9a1792ffcb571b67dabb7f", + "content-hash": "984ffa466fb6bc9281a36b8701147fee", "packages": [ { "name": "composer/pcre", @@ -375,16 +375,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.11.0", + "version": "v3.13.0", "source": { "type": "git", - "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "7dcdea3f2f5f473464e835be9be55283ff8cfdc3" + "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", + "reference": "a6232229a8309e8811dc751c28b91cb34b2943e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/7dcdea3f2f5f473464e835be9be55283ff8cfdc3", - "reference": "7dcdea3f2f5f473464e835be9be55283ff8cfdc3", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/a6232229a8309e8811dc751c28b91cb34b2943e1", + "reference": "a6232229a8309e8811dc751c28b91cb34b2943e1", "shasum": "" }, "require": { @@ -408,7 +408,7 @@ }, "require-dev": { "justinrainbow/json-schema": "^5.2", - "keradus/cli-executor": "^1.5", + "keradus/cli-executor": "^2.0", "mikey179/vfsstream": "^1.6.10", "php-coveralls/php-coveralls": "^2.5.2", "php-cs-fixer/accessible-object": "^1.1", @@ -417,8 +417,8 @@ "phpspec/prophecy": "^1.15", "phpspec/prophecy-phpunit": "^2.0", "phpunit/phpunit": "^9.5", - "phpunitgoodpractices/polyfill": "^1.5", - "phpunitgoodpractices/traits": "^1.9.1", + "phpunitgoodpractices/polyfill": "^1.6", + "phpunitgoodpractices/traits": "^1.9.2", "symfony/phpunit-bridge": "^6.0", "symfony/yaml": "^5.4 || ^6.0" }, @@ -451,8 +451,8 @@ ], "description": "A tool to automatically fix PHP code style", "support": { - "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", - "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v3.11.0" + "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.13.0" }, "funding": [ { @@ -460,7 +460,7 @@ "type": "github" } ], - "time": "2022-09-01T18:24:51+00:00" + "time": "2022-10-31T19:28:50+00:00" }, { "name": "psr/cache", diff --git a/src/Rules.php b/src/Rules.php index 9927cbb..6f66f27 100644 --- a/src/Rules.php +++ b/src/Rules.php @@ -110,6 +110,7 @@ class Rules { 'combine_nested_dirname' => true, 'function_declaration' => [ 'closure_function_spacing' => 'none', + 'closure_fn_spacing' => 'none', ], 'function_typehint_space' => true, 'implode_call' => true, @@ -153,6 +154,7 @@ class Rules { 'new_with_braces' => [ 'anonymous_class' => false, ], + 'no_useless_concat_operator' => true, 'no_useless_nullsafe_operator' => true, 'object_operator_without_whitespace' => true, 'operator_linebreak' => true,