@@ -287,11 +287,11 @@ public function getLongDescription(string $class, string $property, array $conte
287287 }
288288
289289 /**
290- * A docblock is splitted into a template marker, a short description, an optional long description and a tags section.
290+ * A docblock is split into a template marker, a short description, an optional long description and a tags section.
291291 *
292- * - The template marker is either empty, or #@+ or #@-.
292+ * - The template marker is either empty, #@+ or #@-.
293293 * - The short description is started from a non-tag character, and until one or multiple newlines.
294- * - The long description (optional), is started from a non-tag character, and until a new line is encountered followed by a tag.
294+ * - The long description (optional) is started from a non-tag character, and until a new line is encountered followed by a tag.
295295 * - Tags, and the remaining characters
296296 *
297297 * This method returns the short and the long descriptions.
@@ -374,7 +374,7 @@ private function getDescriptionsFromDocNode(PhpDocNode $docNode): array
374374 ];
375375 }
376376
377- private function getDocBlockFromConstructor (string $ class , string $ property ): ?ParamTagValueNode
377+ private function getDocBlockFromConstructor (string & $ class , string $ property ): ?ParamTagValueNode
378378 {
379379 try {
380380 $ reflectionClass = new \ReflectionClass ($ class );
@@ -389,6 +389,7 @@ private function getDocBlockFromConstructor(string $class, string $property): ?P
389389 if (!$ rawDocNode = $ reflectionConstructor ->getDocComment ()) {
390390 return null ;
391391 }
392+ $ class = $ reflectionConstructor ->class ;
392393
393394 $ phpDocNode = $ this ->getPhpDocNode ($ rawDocNode );
394395
0 commit comments