Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| Action | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| __invoke | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace App\Web\HomePage; |
| 6 | |
| 7 | use Psr\Http\Message\ResponseInterface; |
| 8 | use Yiisoft\Yii\View\Renderer\WebViewRenderer; |
| 9 | |
| 10 | class Action |
| 11 | { |
| 12 | public function __construct( |
| 13 | private WebViewRenderer $viewRenderer, |
| 14 | ) {} |
| 15 | |
| 16 | public function __invoke(): ResponseInterface |
| 17 | { |
| 18 | return $this->viewRenderer->render(__DIR__ . '/template'); |
| 19 | } |
| 20 | } |