function MultipleUsesPerLineSniff::process
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint *
Parameters
int $usePointer:
Overrides Sniff::process
File
-
vendor/
slevomat/ coding-standard/ SlevomatCodingStandard/ Sniffs/ Namespaces/ MultipleUsesPerLineSniff.php, line 32
Class
Namespace
SlevomatCodingStandard\Sniffs\NamespacesCode
public function process(File $phpcsFile, $usePointer) : void {
if (!UseStatementHelper::isImportUse($phpcsFile, $usePointer)) {
return;
}
$endPointer = TokenHelper::findNext($phpcsFile, T_SEMICOLON, $usePointer + 1);
$commaPointer = TokenHelper::findNext($phpcsFile, T_COMMA, $usePointer + 1, $endPointer);
if ($commaPointer === null) {
return;
}
$phpcsFile->addError('Multiple used types per use statement are forbidden.', $commaPointer, self::CODE_MULTIPLE_USES_PER_LINE);
}