PHP_CodeSniffer
PHP_CodeSniffer copied to clipboard
PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.
Sniffs in PHP_CodeSniffer should preferably be accompanied by documentation. There are currently still a number of sniffs which don't have documentation. Sniff documentation is provided via XML files in the...
## Setting the scene PHPCS 4.0 will have a minimum supported PHP version of PHP 7.2. PHP 7.2 allows for: * Adding parameter type declarations, with the exception of union/intersection/DNF/mixed...
## Setting the scene PHP 8.0 introduced support for using [named parameters in function calls](https://wiki.php.net/rfc/named_params). While the minimum supported PHP version for PHP_CodeSniffer itself is currently below PHP 8.0 (and...
## Describe the bug The `\PHP_CodeSniffer\Util\Common::$allowedTypes` array and `\PHP_CodeSniffer\Util\Common::suggestTypes()` method prefer some non-normative types, including: - `boolean` instead of `bool` - `integer` instead of `int` These aren't the types accepted...
## Setting the scene At this time, it has not yet been decided what the minimum supported PHP version will be for PHPCS 5.0, though it will be PHP 7.2...
## Is your feature request related to a problem? I want to provide a code quality report to the Sonarqube instance. ## Describe the solution you'd like I want to...
## Is your feature request related to a problem? When running PSR12 against an (older) project, we see this warning message for projects that actually support PHP versions lower than...
## Description I was debugging a complex sniff that implies multiple potential modifications to the same token (that is, right now, not possible - we could discuss about that another...
[PHP 8.3](https://www.php.net/releases/8.3/en.php) includes the following new syntaxes for which it should be verified if the Tokenizer needs updates and/or whether any sniffs need updates: ### To Do - [Dynamic class...
## Is your feature request related to a problem? The use use-case we are trying to implement is described here - https://github.com/inpsyde/php-coding-standards/pull/81. In short, we want to introduce template-specific sniffs....