PhpLintFactory::setUndefined()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 10
c 0
b 0
f 0
ccs 4
cts 4
cp 1
cc 1
nc 1
nop 0
crap 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