Skip to content

Commit cf3d04f

Browse files
committed
Use Yoda check
Exclude vendor directory from PHPCS checks
1 parent 8a61d84 commit cf3d04f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

admin/js/nginx-helper-admin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383

8484
jQuery( '.' + selector ).show();
8585

86-
if ( selector === 'cache_method_redis' ) {
86+
if ( 'cache_method_redis' === selector ) {
8787
jQuery( '.cache_method_fastcgi' ).hide();
8888
} else if ( selector === 'cache_method_fastcgi' ) {
8989
jQuery( '.cache_method_redis' ).hide();

phpcs.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<!-- Exclude folders. -->
2323
<exclude-pattern>*/languages/*</exclude-pattern>
2424
<exclude-pattern>*/admin/predis.php</exclude-pattern> <!-- Predis library file -->
25+
<exclude-pattern>*/vendor/*</exclude-pattern> <!-- Composer vendor directory -->
2526

2627
<!-- Include the WordPress standard. -->
2728
<rule ref="WordPress-VIP-Go">
@@ -57,4 +58,4 @@
5758
<rule ref="PHPCompatibility"/>
5859
<config name="testVersion" value="5.3-99.0"/>
5960

60-
</ruleset>
61+
</ruleset>

0 commit comments

Comments
 (0)