| Total Complexity | 5 |
| Total Lines | 56 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class TestController |
||
| 12 | { |
||
| 13 | |||
| 14 | private Environment $twig; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @param Environment $twig |
||
| 18 | */ |
||
| 19 | public function __construct(Environment $twig) |
||
| 20 | { |
||
| 21 | |||
| 22 | $this->twig = $twig; |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @throws SyntaxError |
||
| 27 | * @throws RuntimeError |
||
| 28 | * @throws LoaderError |
||
| 29 | */ |
||
| 30 | public function index($name): Response |
||
| 31 | { |
||
| 32 | return (new Response()) |
||
| 33 | ->setContent($this->twig->render('test.html.twig', ['name' => $name])); |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @throws SyntaxError |
||
| 38 | * @throws RuntimeError |
||
| 39 | * @throws LoaderError |
||
| 40 | */ |
||
| 41 | public function levelOneRoute(): Response |
||
| 42 | { |
||
| 43 | return (new Response()) |
||
| 44 | ->setContent($this->twig->render('test.html.twig')); |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @throws SyntaxError |
||
| 49 | * @throws RuntimeError |
||
| 50 | * @throws LoaderError |
||
| 51 | */ |
||
| 52 | public function levelTwoRoute(): Response |
||
| 53 | { |
||
| 54 | return (new Response()) |
||
| 55 | ->setContent($this->twig->render('test.html.twig')); |
||
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @throws RuntimeError |
||
| 60 | * @throws SyntaxError |
||
| 61 | * @throws LoaderError |
||
| 62 | */ |
||
| 63 | public function levelThreeRoute(): Response |
||
| 64 | { |
||
| 65 | return (new Response()) |
||
| 66 | ->setContent($this->twig->render('test.html.twig')); |
||
| 67 | } |
||
| 70 | } |