Skip to content

Commit

Permalink
PHP_CodeSniffer 3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
VasekPurchart committed Jun 12, 2018
1 parent fa8f016 commit 0658a26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ValidVariableNameSniff extends \PHP_CodeSniffer\Sniffs\AbstractVariableSni
public const CODE_CAMEL_CAPS = 'NotCamelCaps';

/** @var string[] */
private static $phpReservedVars = [
private static $phpReservedVariables = [
'_SERVER',
'_GET',
'_POST',
Expand All @@ -34,7 +34,7 @@ protected function processVariable(PhpCsFile $file, $stackPointer): void
$tokens = $file->getTokens();
$varName = ltrim($tokens[$stackPointer]['content'], '$');

if (in_array($varName, self::$phpReservedVars, true)) {
if (in_array($varName, self::$phpReservedVariables, true)) {
return; // skip PHP reserved vars
}

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"require": {
"php": "~7.1",
"squizlabs/php_codesniffer": "~3.2.3",
"squizlabs/php_codesniffer": "~3.3.0",
"slevomat/coding-standard": "~4.6"
},
"require-dev": {
Expand Down

0 comments on commit 0658a26

Please sign in to comment.