Skip to content

Commit f4db9ae

Browse files
add PHPCS ignore annotations for non-prefixed globals
1 parent 1b9fa41 commit f4db9ae

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

class-brightleaf-digital-php-checker-plugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,13 +257,13 @@ private static function run_phpcs_embedded( string $php_minor, bool $include_war
257257
$argv_backup = $GLOBALS['argv'] ?? null;
258258
$_argv_backup = isset( $_SERVER['argv'] ) ? sanitize_text_field( wp_unslash( $_SERVER['argv'] ) ) : null;
259259
$argv = array_merge( [ 'phpcs' ], $args );
260-
$GLOBALS['argv'] = $argv;
260+
$GLOBALS['argv'] = $argv; // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
261261
$_SERVER['argv'] = $argv;
262262
$runner = new Runner();
263263
$runner->runPHPCS();
264264
// Restore argv globals.
265265
if ( null !== $argv_backup ) {
266-
$GLOBALS['argv'] = $argv_backup;
266+
$GLOBALS['argv'] = $argv_backup; // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
267267
} else {
268268
unset( $GLOBALS['argv'] ); }
269269
if ( null !== $_argv_backup ) {

0 commit comments

Comments
 (0)