Skip to content

Commit 31fd6db

Browse files
committed
Return invalid tag when factory returned null
1 parent cf16f63 commit 31fd6db

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/DocBlock/StandardTagFactory.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,8 @@ private function createTag(string $body, string $name, TypeContext $context) : T
227227
try {
228228
/** @var callable $callable */
229229
$callable = [$handlerClassName, 'create'];
230-
return call_user_func_array($callable, $arguments);
230+
$tag = call_user_func_array($callable, $arguments);
231+
return $tag ?? InvalidTag::create($body, $name);
231232
} catch (InvalidArgumentException $e) {
232233
return InvalidTag::create($body, $name)->withError($e);
233234
}

0 commit comments

Comments
 (0)