vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php 1 location
|
@@ 141-148 (lines=8) @@
|
| 138 |
|
} |
| 139 |
|
}//end if |
| 140 |
|
|
| 141 |
|
if ($tokens[$stackPtr]['content']{0} === '#') { |
| 142 |
|
$error = 'Perl-style comments are not allowed; use "// Comment" instead'; |
| 143 |
|
$fix = $phpcsFile->addFixableError($error, $stackPtr, 'WrongStyle'); |
| 144 |
|
if ($fix === true) { |
| 145 |
|
$comment = ltrim($tokens[$stackPtr]['content'], "# \t"); |
| 146 |
|
$phpcsFile->fixer->replaceToken($stackPtr, "// $comment"); |
| 147 |
|
} |
| 148 |
|
} |
| 149 |
|
|
| 150 |
|
// We don't want end of block comments. If the last comment is a closing |
| 151 |
|
// curly brace. |
vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ScopeKeywordSpacingSniff.php 1 location
|
@@ 78-87 (lines=10) @@
|
| 75 |
|
} |
| 76 |
|
|
| 77 |
|
$nextToken = $tokens[($stackPtr + 1)]; |
| 78 |
|
if (strlen($nextToken['content']) !== 1 |
| 79 |
|
|| $nextToken['content'] === $phpcsFile->eolChar |
| 80 |
|
) { |
| 81 |
|
$error = 'Scope keyword "%s" must be followed by a single space'; |
| 82 |
|
$data = array($tokens[$stackPtr]['content']); |
| 83 |
|
$fix = $phpcsFile->addFixableError($error, $stackPtr, 'Incorrect', $data); |
| 84 |
|
if ($fix === true) { |
| 85 |
|
$phpcsFile->fixer->replaceToken(($stackPtr + 1), ' '); |
| 86 |
|
} |
| 87 |
|
} |
| 88 |
|
|
| 89 |
|
}//end process() |
| 90 |
|
|