function TraitUseSpacingSniff::process
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint *
Parameters
int $classPointer:
Overrides Sniff::process
File
-
vendor/
slevomat/ coding-standard/ SlevomatCodingStandard/ Sniffs/ Classes/ TraitUseSpacingSniff.php, line 64
Class
Namespace
SlevomatCodingStandard\Sniffs\ClassesCode
public function process(File $phpcsFile, $classPointer) : void {
$this->linesCountBeforeFirstUse = SniffSettingsHelper::normalizeInteger($this->linesCountBeforeFirstUse);
$this->linesCountBeforeFirstUseWhenFirstInClass = SniffSettingsHelper::normalizeNullableInteger($this->linesCountBeforeFirstUseWhenFirstInClass);
$this->linesCountBetweenUses = SniffSettingsHelper::normalizeInteger($this->linesCountBetweenUses);
$this->linesCountAfterLastUse = SniffSettingsHelper::normalizeInteger($this->linesCountAfterLastUse);
$this->linesCountAfterLastUseWhenLastInClass = SniffSettingsHelper::normalizeInteger($this->linesCountAfterLastUseWhenLastInClass);
$usePointers = ClassHelper::getTraitUsePointers($phpcsFile, $classPointer);
if (count($usePointers) === 0) {
return;
}
$this->checkLinesBeforeFirstUse($phpcsFile, $usePointers[0]);
$this->checkLinesAfterLastUse($phpcsFile, $usePointers[count($usePointers) - 1]);
$this->checkLinesBetweenUses($phpcsFile, $usePointers);
}