Skip to content

Commit 033d21c

Browse files
authored
fix: check if 'actionDocBlock' is null (#43)
1 parent 5c0023a commit 033d21c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Builders/Paths/OperationsBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ public function build(array|Collection $routes): array
7676
->action(Str::lower($operationAttribute->method ?: $route->method))
7777
->tags(...$tags)
7878
->deprecated($this->isDeprecated($route->actionDocBlock))
79-
->description($route->actionDocBlock->getDescription()->render() !== '' ? $route->actionDocBlock->getDescription()->render() : null)
80-
->summary($route->actionDocBlock->getSummary() !== '' ? $route->actionDocBlock->getSummary() : null)
79+
->description($route->actionDocBlock?->getDescription()->render() ?: null)
80+
->summary($route->actionDocBlock?->getSummary() ?: null)
8181
->operationId($operationId)
8282
->parameters(...$parameters)
8383
->requestBody($requestBody)

0 commit comments

Comments
 (0)