Passed
Push — master ( f31352...42ec01 )
by Dmitriy
02:35
created

PanelEventsController::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Yii\Debug\Viewer\Panels\Events;
6
7
use Psr\Http\Message\ResponseInterface;
8
use Yiisoft\DataResponse\DataResponseFactoryInterface;
9
10
final class PanelEventsController
11
{
12
    private DataResponseFactoryInterface $responseFactory;
13
14
    /**
15
     * PanelEventsController constructor.
16
     */
17
    public function __construct(DataResponseFactoryInterface $responseFactory)
18
    {
19
        $this->responseFactory = $responseFactory;
20
    }
21
22
    /**
23
     * @return ResponseInterface
24
     */
25
    public function view(): ResponseInterface
26
    {
27
        return $this->responseFactory->createResponse(file_get_contents(__DIR__ . '/view.html'));
28
    }
29
}
30