Passed
Pull Request — master (#58)
by Dmitriy
13:13 queued 10:22
created

GiiParametersProvider   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 60%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getTemplates() 0 3 1
A __construct() 0 7 1
A getRequiredTemplates() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Yii\Gii;
6
7
class GiiParametersProvider
8
{
9 3
    public function __construct(
10
        /**
11
         * @var string[] a list of available code templates. The array keys are the template names,
12
         * and the array values are the corresponding template paths or path aliases.
13
         */
14
        private array $templates = [],
15
    ) {
16
    }
17
18 2
    public function getTemplates(): array
19
    {
20 2
        return $this->templates;
21
    }
22
23
    //TODO: fix
24
    public function getRequiredTemplates(): array
25
    {
26
        return $this->templates;
27
    }
28
}
29