vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/FunctionCallArgumentSpacingSniff.php 1 location
|
@@ 115-121 (lines=7) @@
|
| 112 |
|
if ($tokens[$nextSeparator]['code'] === T_COMMA) { |
| 113 |
|
if ($tokens[($nextSeparator - 1)]['code'] === T_WHITESPACE) { |
| 114 |
|
$prev = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($nextSeparator - 2), null, true); |
| 115 |
|
if (isset(PHP_CodeSniffer_Tokens::$heredocTokens[$tokens[$prev]['code']]) === false) { |
| 116 |
|
$error = 'Space found before comma in function call'; |
| 117 |
|
$fix = $phpcsFile->addFixableError($error, $nextSeparator, 'SpaceBeforeComma'); |
| 118 |
|
if ($fix === true) { |
| 119 |
|
$phpcsFile->fixer->replaceToken(($nextSeparator - 1), ''); |
| 120 |
|
} |
| 121 |
|
} |
| 122 |
|
} |
| 123 |
|
|
| 124 |
|
if ($tokens[($nextSeparator + 1)]['code'] !== T_WHITESPACE) { |
vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php 1 location
|
@@ 158-164 (lines=7) @@
|
| 155 |
|
|
| 156 |
|
// Check whitespace around each of the tokens. |
| 157 |
|
if ($firstSemicolon !== false) { |
| 158 |
|
if ($tokens[($firstSemicolon - 1)]['code'] === T_WHITESPACE) { |
| 159 |
|
$error = 'Space found before first semicolon of FOR loop'; |
| 160 |
|
$fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBeforeFirst'); |
| 161 |
|
if ($fix === true) { |
| 162 |
|
$phpcsFile->fixer->replaceToken(($firstSemicolon - 1), ''); |
| 163 |
|
} |
| 164 |
|
} |
| 165 |
|
|
| 166 |
|
if ($tokens[($firstSemicolon + 1)]['code'] !== T_WHITESPACE |
| 167 |
|
&& $tokens[($firstSemicolon + 1)]['code'] !== T_SEMICOLON |
vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ColonSpacingSniff.php 1 location
|
@@ 75-81 (lines=7) @@
|
| 72 |
|
return; |
| 73 |
|
} |
| 74 |
|
|
| 75 |
|
if ($tokens[($stackPtr - 1)]['code'] === T_WHITESPACE) { |
| 76 |
|
$error = 'There must be no space before a colon in a style definition'; |
| 77 |
|
$fix = $phpcsFile->addFixableError($error, $stackPtr, 'Before'); |
| 78 |
|
if ($fix === true) { |
| 79 |
|
$phpcsFile->fixer->replaceToken(($stackPtr - 1), ''); |
| 80 |
|
} |
| 81 |
|
} |
| 82 |
|
|
| 83 |
|
if ($tokens[($stackPtr + 1)]['code'] === T_SEMICOLON) { |
| 84 |
|
// Empty style definition, ignore it. |