PHP_CodeSniffer
PHP_CodeSniffer copied to clipboard
PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.
## Is your feature request related to a problem? PR #60 introduced a new `Performance` report to measure sniff performance during a scan. This new report will never give reliable/accurate...
## Describe the solution you'd like While reviewing #235, @jrfnl raised a good point that the Generic.CodeAnalysis.ForLoopWithTestFunctionCall sniff should not trigger a warning when the function call in the second...
Inspired by a remark from @fredden in #289 and related to #25, the PHPCS native `AbstractSniffUnitTest` test case should flag sniff test case files which would lead to fixes, but...
## Describe the bug During the review of #235, @jrfnl [noticed](https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/235#pullrequestreview-1828005903) that the Generic.CodeAnalysis.ForLoopWithTestFunctionCall sniff doesn't trigger a warning when a function is called in the test part of the...
- [ ] [1.4.0](https://github.com/squizlabs/PHP_CodeSniffer/releases/tag/1.4.0): `$ignoreComments` parameter for the `AbstractPatternSniff::__construct()` method. - [ ] [3.2.0](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/tag/3.2.0): Old-style ignore annotation syntax - [ ] [3.3.0](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/tag/3.3.0): Old-style (comma-delimited string) setting of array properties -...
... and add a `develop` branch as the default WIP branch. The `stable` branch will become the release-only branch.
Repost from https://github.com/squizlabs/PHP_CodeSniffer/issues/2126: > I may be missing something, but AFAICS and in contrast to the other `//phpcs:` annotations, using `// phpcs:set Standard.Category.Sniff PropertyName value` is not file-based, but changes...
Proposal: treat deprecations/notices/warnings coming from sniffs in a more end-user friendly manner
Repost from https://github.com/squizlabs/PHP_CodeSniffer/issues/3844: > ### Current situation > > As things currently are, when a PHP deprecation/notice/warning/error is received during the scanning of a file, PHPCS turns this into an...
Repost from https://github.com/squizlabs/PHP_CodeSniffer/issues/3118: > I was just wondering why `isset()`, `unset()` and `empty()` - all language constructs which require parentheses - are not considered parentheses owners. > > Would it...
Repost from https://github.com/squizlabs/PHP_CodeSniffer/issues/3115: > The `static` keyword in PHP is used for a number of different things: > * Static properties > * Static methods > * Static closures and...