Skip to content

Commit 42d367c

Browse files
committed
ResolvedPhpDocBlock - fix accessing uninitialized property
1 parent ebc1ca9 commit 42d367c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/PhpDoc/ResolvedPhpDocBlock.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@ public function merge(array $parents, array $parentPhpDocBlocks): self
202202
*/
203203
public function changeParameterNamesByMapping(array $parameterNameMapping): self
204204
{
205+
if (count($this->phpDocNodes) === 0) {
206+
return $this;
207+
}
208+
205209
$paramTags = $this->getParamTags();
206210

207211
$newParamTags = [];

0 commit comments

Comments
 (0)