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

PanelEventsController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 4
c 1
b 0
f 0
dl 0
loc 18
ccs 0
cts 4
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A view() 0 3 1
A __construct() 0 3 1
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