Skip to content

Commit 1eaa1e6

Browse files
committed
Do not require filename for reading PHPDocs
1 parent 4fc76ad commit 1eaa1e6

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/Reflection/Php/PhpClassReflectionExtension.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -648,13 +648,12 @@ private function createMethod(
648648
if (
649649
$currentResolvedPhpDoc === null
650650
&& $methodReflection->getDocComment() !== false
651-
&& $methodReflection->getFileName() !== false
652651
) {
653652
$currentResolvedPhpDoc = $this->phpDocInheritanceResolver->resolvePhpDocForMethod(
654653
$declaringClass,
655654
$methodReflection->getName(),
656655
$this->fileTypeMapper->getResolvedPhpDoc(
657-
$methodReflection->getFileName(),
656+
$methodReflection->getFileName() === false ? null : $methodReflection->getFileName(),
658657
$declaringClassName,
659658
null,
660659
$methodReflection->getName(),
@@ -788,7 +787,7 @@ public function createUserlandMethodReflection(ClassReflection $fileDeclaringCla
788787
[$currentResolvedPhpDoc, $phpDocBlockClassReflection] = $stubPhpDocPair;
789788
}
790789

791-
if ($currentResolvedPhpDoc === null && $methodReflection->getDocComment() !== false && $actualDeclaringClass->getFileName() !== null) {
790+
if ($currentResolvedPhpDoc === null && $methodReflection->getDocComment() !== false) {
792791
$currentResolvedPhpDoc = $this->fileTypeMapper->getResolvedPhpDoc(
793792
$actualDeclaringClass->getFileName(),
794793
$actualDeclaringClass->getName(),

0 commit comments

Comments
 (0)