GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

ErrorCollection   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 29
rs 10
c 0
b 0
f 0
ccs 0
cts 13
cp 0
wmc 3
lcom 1
cbo 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A add() 0 4 1
A findMaxErrors() 0 5 1
A clear() 0 4 1
1
<?php
2
/**
3
 * @author  Alexander Getmanskii <[email protected]>
4
 * @package GetSky\ParserExpressions
5
 */
6
namespace GetSky\ParserExpressions;
7
8
/**
9
 * It is a collection of errors.
10
 */
11
class ErrorCollection implements ErrorCollectionInterface
12
{
13
    /**
14
     * @var array The array of errors.
15
     */
16
    protected $errors = [];
17
18
    /**
19
     * {@inheritdoc}
20
     */
21
    public function add(RuleInterface $rule, $index, $depth)
22
    {
23
        $this->errors[$depth][] = new ParsingError($rule, $index, $depth);
24
    }
25
26
    /**
27
     * {@inheritdoc}
28
     */
29
    public function findMaxErrors()
30
    {
31
        ksort($this->errors);
32
        return reset($this->errors);
33
    }
34
35
    public function clear()
36
    {
37
        $this->errors = [];
38
    }
39
}
40