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.
Completed
Push — develop ( 50cef7...02ca20 )
by Rolf
01:54
created

NotRule::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
namespace izzum\rules;
3
4
/**
5
 * When a rule is chained using the 'NOT' operator the rule given in the
6
 * constructor should not apply.
7
 * The rule is effectively negated.
8
 *
9
 * @author Rolf Vreijdenberger
10
 * @author Richard Ruiter
11
 */
12
class NotRule extends Rule {
13
    
14
    /**
15
     *
16
     * @var Rule
17
     */
18
    private $original;
19
20
    /**
21
     *
22
     * @param Rule $original            
23
     */
24 2
    public function __construct(Rule $original)
25
    {
26 2
        $this->original = $original;
27 2
    }
28
29 2
    public function _applies()
30
    {
31 2
        return (boolean) !$this->original->applies();
32
    }
33
34
    /**
35
     * Return original results
36
     *
37
     * @return array
38
     */
39 1
    public function getResults()
40
    {
41 1
        return $this->original->getResults();
42
    }
43
}
44