Total Complexity | 3 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
9 | class BarController |
||
10 | { |
||
11 | /** |
||
12 | * BarController constructor. |
||
13 | * @param StreamFactoryInterface $streamFactory |
||
14 | */ |
||
15 | public function __construct(StreamFactoryInterface $streamFactory) |
||
16 | { |
||
17 | // do nothing |
||
18 | } |
||
19 | |||
20 | /** |
||
21 | * @param RequestInterface $request |
||
22 | * @return Response |
||
23 | */ |
||
24 | public function defaultAction(RequestInterface $request): Response |
||
25 | { |
||
26 | return new Response('called method is: ' . $request->getMethod()); |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * @param RequestInterface $request |
||
31 | * @param string $name |
||
32 | * @param $type |
||
33 | * @param int $age |
||
34 | * @return Response |
||
35 | */ |
||
36 | public function frameworkNameAction(RequestInterface $request, string $name, $type, int $age): Response |
||
37 | { |
||
38 | return new Response( |
||
39 | 'method: ' . $request->getMethod() . '; ' . |
||
40 | 'name: ' . $name . '; ' . |
||
41 | 'type: ' . $type . '; ' . |
||
42 | 'age: ' . $age |
||
43 | ); |
||
47 |