Skip to content

Commit

Permalink
code style
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpapst committed Mar 10, 2024
1 parent e96fe98 commit 4ab73a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions API/DemoController.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#[IsGranted('ROLE_USER')]
final class DemoController extends AbstractController
{
public function __construct(private ViewHandlerInterface $viewHandler)
public function __construct(private readonly ViewHandlerInterface $viewHandler)
{
}

Expand Down Expand Up @@ -61,7 +61,7 @@ public function cgetAction(ParamFetcherInterface $paramFetcher): Response
public function getAction(int $id): Response
{
if (0 === $id) {
throw new NotFoundException();
throw $this->createNotFoundException('Unsupported demo ID');
}

$demo = new DemoEntity();
Expand Down

0 comments on commit 4ab73a9

Please sign in to comment.