|
@@ 267-273 (lines=7) @@
|
| 264 |
|
); |
| 265 |
|
|
| 266 |
|
if ($prev === $implementsToken && $tokens[$className]['line'] !== ($tokens[$prev]['line'] + 1)) { |
| 267 |
|
if ($keywordTokenType === T_EXTENDS) { |
| 268 |
|
$error = 'The first item in a multi-line extends list must be on the line following the extends keyword'; |
| 269 |
|
$fix = $phpcsFile->addFixableError($error, $className, 'FirstExtendsInterfaceSameLine'); |
| 270 |
|
} else { |
| 271 |
|
$error = 'The first item in a multi-line implements list must be on the line following the implements keyword'; |
| 272 |
|
$fix = $phpcsFile->addFixableError($error, $className, 'FirstInterfaceSameLine'); |
| 273 |
|
} |
| 274 |
|
|
| 275 |
|
if ($fix === true) { |
| 276 |
|
$phpcsFile->fixer->beginChangeset(); |
|
@@ 289-295 (lines=7) @@
|
| 286 |
|
$phpcsFile->fixer->endChangeset(); |
| 287 |
|
} |
| 288 |
|
} else if ($tokens[$prev]['line'] !== ($tokens[$className]['line'] - 1)) { |
| 289 |
|
if ($keywordTokenType === T_EXTENDS) { |
| 290 |
|
$error = 'Only one interface may be specified per line in a multi-line extends declaration'; |
| 291 |
|
$fix = $phpcsFile->addFixableError($error, $className, 'ExtendsInterfaceSameLine'); |
| 292 |
|
} else { |
| 293 |
|
$error = 'Only one interface may be specified per line in a multi-line implements declaration'; |
| 294 |
|
$fix = $phpcsFile->addFixableError($error, $className, 'InterfaceSameLine'); |
| 295 |
|
} |
| 296 |
|
|
| 297 |
|
if ($fix === true) { |
| 298 |
|
$phpcsFile->fixer->beginChangeset(); |