From bff0ccb6c773b6e02cf5f9c0bb5ed93af204478c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Sat, 27 May 2023 13:45:01 +0200 Subject: [PATCH 1/2] Enhancement: Pass all directories and names at once --- .php-cs-fixer.dist.php | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 43399376ee7..d7f19144ff1 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -10,16 +10,20 @@ $finder = PhpCsFixer\Finder::create() ->files() - ->in(__DIR__ . '/src') - ->in(__DIR__ . '/tests/_files') - ->in(__DIR__ . '/tests/end-to-end') - ->in(__DIR__ . '/tests/unit') - ->notName('*.phpt') - ->notName('ClassWithAllPossibleReturnTypes.php') - ->notName('ClassWithUnionReturnTypes.php') - ->notName('ClassWithStaticReturnTypes.php') - ->notName('ValueObjectWithEqualsMethodWithUnionReturnType.php') - ->notName('ValueObjectWithEqualsMethodThatHasUnionParameterType.php'); + ->in([ + __DIR__ . '/src', + __DIR__ . '/tests/_files', + __DIR__ . '/tests/end-to-end', + __DIR__ . '/tests/unit', + ]) + ->notName([ + '*.phpt', + 'ClassWithAllPossibleReturnTypes.php', + 'ClassWithStaticReturnTypes.php', + 'ClassWithUnionReturnTypes.php', + 'ValueObjectWithEqualsMethodThatHasUnionParameterType.php', + 'ValueObjectWithEqualsMethodWithUnionReturnType.php', + ]); $config = new PhpCsFixer\Config; $config->setFinder($finder) From 5e676c9ca2f452de9dadb110f4ffdf903b4de6ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Sat, 27 May 2023 16:34:19 +0200 Subject: [PATCH 2/2] Enhancement: Enable types_spaces fixer --- .php-cs-fixer.dist.php | 1 + 1 file changed, 1 insertion(+) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index d7f19144ff1..e3bd27b631c 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -319,6 +319,7 @@ ] ], 'trim_array_spaces' => true, + 'types_spaces' => true, 'unary_operator_spaces' => true, 'visibility_required' => [ 'elements' => [