PhpLintFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 26
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A fromArray() 0 7 1
A setUndefined() 0 7 1
1
<?php
2
3
namespace PhpGitHooks\Module\Configuration\Service;
4
5
use PhpGitHooks\Module\Configuration\Domain\Enabled;
6
use PhpGitHooks\Module\Configuration\Domain\PhpLint;
7
use PhpGitHooks\Module\Configuration\Domain\Undefined;
8
9
class PhpLintFactory
10
{
11
    /**
12
     * @param $data
13
     *
14
     * @return PhpLint
15
     */
16 1
    public static function fromArray($data)
17
    {
18 1
        return new PhpLint(
19 1
            new Undefined(false),
20 1
            new Enabled($data)
21
        );
22
    }
23
24
    /**
25
     * @return PhpLint
26
     */
27 3
    public static function setUndefined()
28
    {
29 3
        return new PhpLint(
30 3
            new Undefined(true),
31 3
            new Enabled(false)
32
        );
33
    }
34
}
35