Skip to content

Commit

Permalink
修复
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurunsoft committed Apr 27, 2024
1 parent 9955869 commit c4bf74e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Bean/Parser/BeanParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function parse(\Imi\Bean\Annotation\Base $annotation, string $className,
else
{
$docblock = DocBlock::getDocBlock($comment, new Context($propRef->getDeclaringClass()->getNamespaceName()));
$tag = $docblock->getTagsByName('var')[0] ?? null;
$tag = $docblock->getTagsWithTypeByName('var')[0] ?? null;
if ($tag)
{
$annotation->name = $tag->getType()->__toString();
Expand Down
3 changes: 1 addition & 2 deletions src/Components/grpc/src/Util/GrpcInterfaceManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ public function bind($interface, ?string $serviceName = null): void
else
{
$docblock = DocBlock::getDocBlock($docComment, new Context($interface->getNamespaceName()));
// @phpstan-ignore-next-line
$responseClass = (string) $docblock->getTagsByName('return')[0]->getType();
$responseClass = (string) $docblock->getTagsWithTypeByName('return')[0]->getType();
}

$methods[$method->getName()] = [
Expand Down

0 comments on commit c4bf74e

Please sign in to comment.