function RequireOneLinePropertyDocCommentSniff::process
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint *
Parameters
int $docCommentStartPointer:
Overrides AbstractRequireOneLineDocComment::process
File
-
vendor/
slevomat/ coding-standard/ SlevomatCodingStandard/ Sniffs/ Commenting/ RequireOneLinePropertyDocCommentSniff.php, line 21
Class
Namespace
SlevomatCodingStandard\Sniffs\CommentingCode
public function process(File $phpcsFile, $docCommentStartPointer) : void {
$propertyPointer = TokenHelper::findNext($phpcsFile, T_VARIABLE, $docCommentStartPointer + 1);
if ($propertyPointer === null) {
return;
}
// Not a property
if (!PropertyHelper::isProperty($phpcsFile, $propertyPointer)) {
return;
}
// Check that doc comment belongs to the found property
$propertyDocCommentStartPointer = DocCommentHelper::findDocCommentOpenPointer($phpcsFile, $propertyPointer);
if ($propertyDocCommentStartPointer !== $docCommentStartPointer) {
return;
}
// Only validate properties without description
if (DocCommentHelper::hasDocCommentDescription($phpcsFile, $propertyPointer)) {
return;
}
parent::process($phpcsFile, $docCommentStartPointer);
}