Bug Description
There's a false negative when there's no comma after a single item array. For example, this will flag as expected:
$args = array(
'nopaging' => true, // Bad.
);
However, this won't:
$args = array(
'nopaging' => true // Bad.
);
Minimal Code Snippet
This should flag as an error:
$args = array( 'nopaging' => true );
Error Code
WordPressVIPMinimum.Performance.NoPaging.nopaging_nopaging
Environment
Use php -v and composer show to get versions.
| Question |
Answer |
| PHP version |
7.4.27 |
| PHP_CodeSniffer version |
3.6.2 |
| VIPCS version |
2.3.3 |
Tested Against master branch?
Bug Description
There's a false negative when there's no comma after a single item array. For example, this will flag as expected:
However, this won't:
Minimal Code Snippet
This should flag as an error:
Error Code
WordPressVIPMinimum.Performance.NoPaging.nopaging_nopaging
Environment
Use
php -vandcomposer showto get versions.Tested Against
masterbranch?masterbranch of VIPCS.developbranch of VIPCS.