Skip to content

Releases: Moxio/php-codesniffer-sniffs

1.2.0

03 Nov 12:05
Compare
Choose a tag to compare

Added new sniff Moxio.PHP.DisallowArrayCombinersWithSingleArray. This sniff disallows calls to functions that combine two or more with only a single array given as an argument. This applies to functions like array_merge(_recursive), array_replace(_recursive) and all variants of array_diff and array_intersect. Such a call does not make sense, and is most likely a result of a misplaced comma or parenthesis.

1.1.1

22 Sep 14:42
Compare
Choose a tag to compare

AbstractFunctionCallSniff now correctly handles short array syntax in function call parameters. In particular this fixes #2. Thanks to Ondřej Mirtes (@ondrejmirtes) for reporting this issue.

Added PHPUnit tests.

1.1.0

02 Aug 13:25
Compare
Choose a tag to compare

Added new sniff Moxio.PHP.DisallowUniqidWithoutMoreEntropy. This sniff disallows calls to uniqid() without the $more_entropy parameter being set to true, because such calls can harm performance.

1.0.0

26 Jun 14:19
Compare
Choose a tag to compare

From this release, the sniffs are supported (only) with PHP_CodeSniffer version 3.x.

The sniff classes have been renamed in accordance with the namespacing requirement of PHP_CodeSniffer 3.

  • Moxio_Sniffs_PHP_DisallowBareContinueInSwitchSniff -> Moxio\Sniffs\PHP\DisallowBareContinueInSwitchSniff
  • Moxio_Sniffs_PHP_DisallowImplicitLooseComparisonSniff -> Moxio\Sniffs\PHP\DisallowImplicitLooseComparisonSniff
  • Moxio_Sniffs_Abstract_AbstractFunctionCallSniff -> Moxio\Sniffs\AbstractFunctionCallSniff

Thanks to Petr Bugyík (@o5) for testing this version with the final 3.x release of PHP_CodeSniffer.