Juliette
Juliette
## Is your feature request related to a problem? PHP 5.3 introduced namespaces into PHP. Refs: * https://www.php.net/manual/en/migration53.new-features.php * https://www.php.net/manual/en/language.namespaces.php At this moment WPCS has no formatting rules for namespace...
## Rationale WPCS currently has its own `ClassInstantiation` sniff. Since PHPCS 3.5.0, the PSR12 standard in PHPCS itself also contains a `PSR12.Classes.ClassInstantiation` sniff. I've done a comparison of the two...
Work on WordPressCS 3.0.0 will start in the near future. @GaryJones, @dingo-d and me have recently had a call to discuss what we envision for WPCS 3.0.0. This issue is...
Hooks which are marked as `@deprecated` should be ignored for the purposes of the `ValidHookName` sniff. Related: #1797, #1806, #1811
All sniffs should be accompanied by documentation in the form of a `SniffNameStandard.xml` file. A `SniffNameStandard.xml` file contains a (short) description of each rule(s) the sniff checks and a code...
## Rationale The upstream `Generic.CodeAnalysis.UnusedFunctionParameter` checks if all parameters declared in a function signature are used within the function. This sniff was, so far, not added to WPCS as it...
Add sniff to check that any call to `wp_redirect()` and `wp_safe_redirect()` is followed by a call to `die()`, `exit` or `wp_die()`. The call is allowed to be conditional. ```php wp_redirect(...
As discussed in #1908, the wiki pages should be reviewed and references to "whitelisting" code should be replaced with other phrasing, such as "ignoring code" The wiki should also be...
## Is your feature request related to a problem? _Yoda conditions_ are the practice to reverse how comparisons in conditions are written, having the value being compared to on the...
In https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/pull/979#issuecomment-310235942 : > Just thinking.... maybe we should create a sniff that checks for calls to any of the _deprecated_....() functions and ensures that there is a @deprecated tag...