File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 2727 </rule >
2828
2929 <!-- Duplicate of upstream. Can be removed once minimum PHPCS requirement has gone up.
30- https://github.com/squizlabs/PHP_CodeSniffer/pull/1594 -->
30+ https://github.com/squizlabs/PHP_CodeSniffer/pull/1594
31+ Note: the "assignment in ternary" part of the sniff is currently not yet covered in
32+ the upstream version. This needs to be pulled first before we can defer to upstream. -->
3133 <rule ref =" WordPress.CodeAnalysis.AssignmentInCondition" />
3234
3335 <!-- More generic PHP best practices.
145147 <rule ref =" WordPress.NamingConventions.PrefixAllGlobals" />
146148
147149 <!-- Check that object instantiations always have braces & are not assigned by reference.
148- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/919 -->
150+ https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/919
151+ Note: there is a similar upstream sniff `PSR12.Classes.ClassInstantiation`, however
152+ that sniff:
153+ - does not cover JS files;
154+ - does not demand parentheses for PHP anonymous classes;
155+ - does not check the whitespace between the class name and the parentheses;
156+ - does not check for PHP new by reference.
157+ For those reasons, the WPCS version should remain. -->
149158 <rule ref =" WordPress.Classes.ClassInstantiation" />
150159
151160 <!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1157 -->
You can’t perform that action at this time.
0 commit comments