Skip to content

Commit d04e0c6

Browse files
soyukaclaude
andcommitted
cs(laravel): add missing type hints on ErrorRenderer
| Q | A | ------------- | --- | Branch? | main | Tickets | ∅ | License | MIT | Doc PR | ∅ Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f0f1975 commit d04e0c6

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Laravel/Exception/ErrorRenderer.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@
2727
use Illuminate\Auth\Access\AuthorizationException;
2828
use Illuminate\Auth\AuthenticationException;
2929
use Negotiation\Negotiator;
30+
use Illuminate\Http\Request;
3031
use Symfony\Component\HttpFoundation\Exception\RequestExceptionInterface;
32+
use Symfony\Component\HttpFoundation\Response;
3133
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface as SymfonyHttpExceptionInterface;
3234
use Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer;
3335

@@ -56,14 +58,14 @@ public function __construct(
5658
$this->negotiator = $negotiator;
5759
}
5860

59-
public function shouldRender($request, \Throwable $throwable)
61+
public function shouldRender(Request $request, \Throwable $throwable): bool
6062
{
6163
$apiOperation = $this->initializeOperation($request);
6264

6365
return null !== $apiOperation;
6466
}
6567

66-
public function render($request, \Throwable $exception)
68+
public function render(Request $request, \Throwable $exception): ?Response
6769
{
6870
$apiOperation = $this->initializeOperation($request);
6971

0 commit comments

Comments
 (0)