Passed
Push — master ( 1ad763...5bc17e )
by Rustam
07:30
created

PanelRequestController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
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 19
ccs 0
cts 4
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A view() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Yii\Debug\Viewer\Panels\Request;
6
7
use Psr\Http\Message\ResponseInterface;
8
use Yiisoft\DataResponse\DataResponseFactoryInterface;
9
10
final class PanelRequestController
11
{
12
    private DataResponseFactoryInterface $responseFactory;
13
14
    /**
15
     * PanelInfoController constructor.
16
     */
17
    public function __construct(
18
        DataResponseFactoryInterface $responseFactory
19
    ) {
20
        $this->responseFactory = $responseFactory;
21
    }
22
23
    /**
24
     * @return ResponseInterface
25
     */
26
    public function view(): ResponseInterface
27
    {
28
        return $this->responseFactory->createResponse(file_get_contents(__DIR__ . '/view.html'));
29
    }
30
}
31