function RequireConstructorPropertyPromotionSniff::isPropertyDocCommentUseful
1 call to RequireConstructorPropertyPromotionSniff::isPropertyDocCommentUseful()
- RequireConstructorPropertyPromotionSniff::process in vendor/
slevomat/ coding-standard/ SlevomatCodingStandard/ Sniffs/ Classes/ RequireConstructorPropertyPromotionSniff.php - * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint *
File
-
vendor/
slevomat/ coding-standard/ SlevomatCodingStandard/ Sniffs/ Classes/ RequireConstructorPropertyPromotionSniff.php, line 316
Class
Namespace
SlevomatCodingStandard\Sniffs\ClassesCode
private function isPropertyDocCommentUseful(File $phpcsFile, int $propertyPointer) : bool {
if (DocCommentHelper::hasDocCommentDescription($phpcsFile, $propertyPointer)) {
return true;
}
foreach (AnnotationHelper::getAnnotations($phpcsFile, $propertyPointer) as $annotation) {
$annotationValue = $annotation->getValue();
if (!$annotationValue instanceof VarTagValueNode) {
return true;
}
if ($annotationValue->description !== '') {
return true;
}
}
return false;
}