Result::getExpected()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PhpNsFixer\Fixer;
6
7
use Symfony\Component\Finder\SplFileInfo;
8
9
final class Result
10
{
11
    /**
12
     * @var SplFileInfo
13
     */
14
    private $file;
15
16
    /**
17
     * @var bool
18
     */
19
    private $valid;
20
21
    /**
22
     * @var string
23
     */
24
    private $actual;
25
26
    /**
27
     * @var string
28
     */
29
    private $expected;
30
31
    /**
32
     * @param SplFileInfo $file
33
     * @param bool $valid
34
     * @param string $actual
35
     * @param string $expected
36
     */
37 26
    public function __construct(SplFileInfo $file, bool $valid = false, string $actual = '', string $expected = '')
38
    {
39 26
        $this->file = $file;
40 26
        $this->valid = $valid;
41 26
        $this->actual = $actual;
42 26
        $this->expected = $expected;
43 26
    }
44
45
    /**
46
     * @return SplFileInfo
47
     */
48 17
    public function getFile(): SplFileInfo
49
    {
50 17
        return $this->file;
51
    }
52
53
    /**
54
     * @return string
55
     */
56 16
    public function getActual(): string
57
    {
58 16
        return $this->actual;
59
    }
60
61
    /**
62
     * @return string
63
     */
64 16
    public function getExpected(): string
65
    {
66 16
        return $this->expected;
67
    }
68
69
    /**
70
     * @return bool
71
     */
72 23
    public function isValid(): bool
73
    {
74 23
        return $this->valid;
75
    }
76
}
77