diff --git a/config/set/php-cs-fixer.php b/config/set/php-cs-fixer.php index 789d415..4f07671 100644 --- a/config/set/php-cs-fixer.php +++ b/config/set/php-cs-fixer.php @@ -59,6 +59,16 @@ $services->set(IncrementStyleFixer::class) ->call('configure', [['style' => 'post']]); + $services->set(PhpdocTypesOrderFixer::class) + ->call( + 'configure', + [ + [ + 'null_adjustment' => 'always_last', + 'sort_algorithm' => 'none', + ], + ] + ); $parameters = $containerConfigurator->parameters(); $parameters->set( Option::SKIP, diff --git a/config/set/php_codesniffer.php b/config/set/php_codesniffer.php index 505d1be..54ad9b7 100644 --- a/config/set/php_codesniffer.php +++ b/config/set/php_codesniffer.php @@ -243,6 +243,7 @@ UseDeclarationSniff::class . '.UseAfterBrace' => null, AnonClassDeclarationSniff::class . '.SpaceAfterKeyword' => null, ControlStructureSpacingSniff::class . '.LineAfterClose' => null, + PostStatementCommentSniff::class . '.Found' => null, ] ); }; diff --git a/correct/TestClass.php b/correct/TestClass.php index 8a357a8..cd2e162 100644 --- a/correct/TestClass.php +++ b/correct/TestClass.php @@ -119,4 +119,9 @@ public function useConst() { return PHP_EOL; } + + public function testSingleArray() + { + return ['a', 'b']; // post statement comment + } } diff --git a/wrong/TestClass.php b/wrong/TestClass.php index 6c62acc..a89422c 100644 --- a/wrong/TestClass.php +++ b/wrong/TestClass.php @@ -104,4 +104,9 @@ public function useConst() { return PHP_EOL; } + + public function testSingleArray() + { + return ['a','b'];// post statement comment + } } \ No newline at end of file