Passed
Push — master ( 8423a6...5663f2 )
by Alexander
09:42
created

ContentViewInjection   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getContentParameters() 0 4 1
A __construct() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\ViewInjection;
6
7
use App\ApplicationParameters;
8
use Yiisoft\Yii\View\ContentParametersInjectionInterface;
9
10
final class ContentViewInjection implements ContentParametersInjectionInterface
11
{
12
    private ApplicationParameters $applicationParameters;
13
14 2
    public function __construct(
15
        ApplicationParameters $applicationParameters
16
    ) {
17 2
        $this->applicationParameters = $applicationParameters;
18 2
    }
19
20 2
    public function getContentParameters(): array
21
    {
22
        return [
23 2
            'applicationParameters' => $this->applicationParameters,
24
        ];
25
    }
26
}
27