ScannedSourceFile   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 66
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 66
ccs 15
cts 15
cp 1
rs 10
c 0
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getTotalWarnings() 0 3 1
A getErrors() 0 3 1
A getTotalErrors() 0 3 1
A __construct() 0 5 1
A getPath() 0 3 1
A getWarnings() 0 3 1
1
<?php
2
3
4
namespace cwreden\php7ccAnalyser;
5
6
7
class ScannedSourceFile
8
{
9
    /**
10
     * @var string
11
     */
12
    private $path;
13
    /**
14
     * @var IssueCollection
15
     */
16
    private $warnings;
17
    /**
18
     * @var IssueCollection
19
     */
20
    private $errors;
21
22
    /**
23
     * ScannedSourceFile constructor.
24
     * @param $path
25
     * @param IssueCollection $warnings
26
     * @param IssueCollection $errors
27
     */
28 5
    public function __construct($path, IssueCollection $warnings, IssueCollection $errors)
29
    {
30 5
        $this->path = $path;
31 5
        $this->warnings = $warnings;
32 5
        $this->errors = $errors;
33 5
    }
34
35
    /**
36
     * @return string
37
     */
38 1
    public function getPath(): string
39
    {
40 1
        return $this->path;
41
    }
42
43
    /**
44
     * @return int
45
     */
46 1
    public function getTotalWarnings(): int
47
    {
48 1
        return $this->warnings->getTotal();
49
    }
50
51
    /**
52
     * @return int
53
     */
54 1
    public function getTotalErrors(): int
55
    {
56 1
        return $this->errors->getTotal();
57
    }
58
59
    /**
60
     * @return IssueCollection
61
     */
62 1
    public function getWarnings(): IssueCollection
63
    {
64 1
        return $this->warnings;
65
    }
66
67
    /**
68
     * @return IssueCollection
69
     */
70 1
    public function getErrors(): IssueCollection
71
    {
72 1
        return $this->errors;
73
    }
74
}