vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php 1 location
|
@@ 403-413 (lines=11) @@
|
| 400 |
|
// is actually some code to indent. |
| 401 |
|
if ($tokens[$i]['code'] === T_WHITESPACE) { |
| 402 |
|
$nextCode = $phpcsFile->findNext(T_WHITESPACE, ($i + 1), ($closeBracket + 1), true); |
| 403 |
|
if ($tokens[$nextCode]['line'] !== $lastLine) { |
| 404 |
|
if ($inArg === false) { |
| 405 |
|
$error = 'Empty lines are not allowed in multi-line function calls'; |
| 406 |
|
$fix = $phpcsFile->addFixableError($error, $i, 'EmptyLine'); |
| 407 |
|
if ($fix === true) { |
| 408 |
|
$phpcsFile->fixer->replaceToken($i, ''); |
| 409 |
|
} |
| 410 |
|
} |
| 411 |
|
|
| 412 |
|
continue; |
| 413 |
|
} |
| 414 |
|
} else { |
| 415 |
|
$nextCode = $i; |
| 416 |
|
} |
vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php 1 location
|
@@ 169-179 (lines=11) @@
|
| 166 |
|
// Before counting this comma, make sure we are not |
| 167 |
|
// at the end of the array. |
| 168 |
|
$next = $phpcsFile->findNext(T_WHITESPACE, ($i + 1), $arrayEnd, true); |
| 169 |
|
if ($next !== false) { |
| 170 |
|
$valueCount++; |
| 171 |
|
$commas[] = $i; |
| 172 |
|
} else { |
| 173 |
|
// There is a comma at the end of a single line array. |
| 174 |
|
$error = 'Comma not allowed after last value in single-line array declaration'; |
| 175 |
|
$fix = $phpcsFile->addFixableError($error, $i, 'CommaAfterLast'); |
| 176 |
|
if ($fix === true) { |
| 177 |
|
$phpcsFile->fixer->replaceToken($i, ''); |
| 178 |
|
} |
| 179 |
|
} |
| 180 |
|
} |
| 181 |
|
}//end for |
| 182 |
|
|
vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php 1 location
|
@@ 165-172 (lines=8) @@
|
| 162 |
|
} |
| 163 |
|
|
| 164 |
|
if ($name === '@author') { |
| 165 |
|
if ($tokens[$string]['content'] !== 'Squiz Pty Ltd <[email protected]>') { |
| 166 |
|
$error = 'Expected "Squiz Pty Ltd <[email protected]>" for author tag'; |
| 167 |
|
$fix = $phpcsFile->addFixableError($error, $tag, 'IncorrectAuthor'); |
| 168 |
|
if ($fix === true) { |
| 169 |
|
$expected = 'Squiz Pty Ltd <[email protected]>'; |
| 170 |
|
$phpcsFile->fixer->replaceToken($string, $expected); |
| 171 |
|
} |
| 172 |
|
} |
| 173 |
|
} else if ($name === '@copyright') { |
| 174 |
|
if (preg_match('/^([0-9]{4})(-[0-9]{4})? (Squiz Pty Ltd \(ABN 77 084 670 600\))$/', $tokens[$string]['content']) === 0) { |
| 175 |
|
$error = 'Expected "xxxx-xxxx Squiz Pty Ltd (ABN 77 084 670 600)" for copyright declaration'; |