Skip to content

Commit 47aa39d

Browse files
committed
PhpDocBlock - skip abstract trait methods without PHPDoc
1 parent 4d9f2b1 commit 47aa39d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/PhpDoc/PhpDocBlock.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,14 +210,18 @@ public static function resolvePhpDocBlockForMethod(
210210
continue;
211211
}
212212

213+
if ($traitMethod->getDocComment() === null) {
214+
continue;
215+
}
216+
213217
$methodVariant = $traitMethod->getOnlyVariant();
214218
$positionalMethodParameterNames = [];
215219
foreach ($methodVariant->getParameters() as $methodParameter) {
216220
$positionalMethodParameterNames[] = $methodParameter->getName();
217221
}
218222

219223
$docBlocksFromParents[] = new self(
220-
$traitMethod->getDocComment() ?? ResolvedPhpDocBlock::EMPTY_DOC_STRING,
224+
$traitMethod->getDocComment(),
221225
$classReflection->getFileName(),
222226
$classReflection,
223227
$traitReflection->getName(),

0 commit comments

Comments
 (0)