phpcs-composer icon indicating copy to clipboard operation
phpcs-composer copied to clipboard

Official 10up PHPCS rules.

Results 9 phpcs-composer issues
Sort by recently updated
recently updated
newest added

### Describe the bug If you clone the project and run composer install, it installs` phpcompatibility/php-compatibility dev-develop` which has the latest PHP sniffs. ![image](https://github.com/10up/phpcs-composer/assets/4009928/25a991ed-88a3-4012-bcec-9f6a10dba46b) But when is installed via package...

### Description of the Change Reenable the `WordPress.Security.NonceVerification.Missing` to reduce the chance of inadvertent CSRF errors in our code. Additionally, `wp_verify_nonce()` is configured as an unslashing and sanitizing function. This...

### Describe the bug Currently the `WordPress.Security.NonceVerification.Missing` is disabled with a comment that it rarely works properly. My guess is the source of this comment is related to pages that...

I can't figure out a way to overwrite excluded files in a child ruleset. Is it possible?

We might want to ignore `composer.lock` file. > For your library you may commit the composer.lock file if you want to. This can help your team to always test against...

In the latest release we allow [same line control structures](https://github.com/10up/phpcs-composer/blob/master/10up-Default/ruleset.xml#L49). What are the benefits of using this type of control structure over the conditional operator? If the goal is to...

question

https://github.com/10up/phpcs-composer/blob/6c07f1c47c754fd1e92f3f88a10828e327048dc2/10up-Default/ruleset.xml#L21-L24 Could we disallow mixed line endings? For me files with mixed line endings are a nuisance. I open a file and my editor normalises them on save so when...

### Describe the bug Installed according to instructions in README.md, in a non-10up WordPress plugin to audit it. (https://wordpress.org/plugins/fix-alt-text/) ``` /wp-content/plugins/fix-alt-text$ composer run lint > phpcs . ERROR: Referenced sniff...

### Describe the bug WARNING: The 10up PHPCS standard uses 1 deprecated sniff ------------------------------------------------------------------------------- - Generic.Functions.CallTimePassByReference This sniff has been deprecated since v3.12.1 and will be removed in v4.0.0. Deprecated...