Skip to content

Commit

Permalink
Merge pull request #40 from zingimmick/disable-post-statement-comment
Browse files Browse the repository at this point in the history
Disable PostStatementCommentSniff.Found
  • Loading branch information
kodiakhq[bot] authored Sep 26, 2020
2 parents 900b86b + 977b036 commit e886833
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
10 changes: 10 additions & 0 deletions config/set/php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions config/set/php_codesniffer.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@
UseDeclarationSniff::class . '.UseAfterBrace' => null,
AnonClassDeclarationSniff::class . '.SpaceAfterKeyword' => null,
ControlStructureSpacingSniff::class . '.LineAfterClose' => null,
PostStatementCommentSniff::class . '.Found' => null,
]
);
};
5 changes: 5 additions & 0 deletions correct/TestClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,9 @@ public function useConst()
{
return PHP_EOL;
}

public function testSingleArray()
{
return ['a', 'b']; // post statement comment
}
}
5 changes: 5 additions & 0 deletions wrong/TestClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,9 @@ public function useConst()
{
return PHP_EOL;
}

public function testSingleArray()
{
return ['a','b'];// post statement comment
}
}

0 comments on commit e886833

Please sign in to comment.