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.

RuleResult   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getRule() 0 4 1
A getResult() 0 4 1
1
<?php
2
namespace izzum\rules;
3
4
/**
5
 * RuleResult contains a result for a certain rule, indicating that the
6
 * rule wants to store some extra information for a client to consume.
7
 *
8
 * This could be when there are multiple steps or paths in rule execution and
9
 * the client wants to know which one of those were executed after a
10
 * rule->applies() call has been made.
11
 *
12
 * This will most probably happen in a rule where multipe business rules are
13
 * combined or where there are multiple conditional paths.
14
 *
15
 * @author Rolf Vreijdenberger
16
 * @author Richard Ruiter
17
 */
18
class RuleResult {
19
    /**
20
     *
21
     * @var Rule
22
     */
23
    private $rule;
24
    
25
    /**
26
     *
27
     * @var string
28
     */
29
    private $result;
30
31
    /**
32
     *
33
     * @param Rule $rule            
34
     * @param string $result            
35
     */
36 1
    public function __construct(Rule $rule, $result)
37
    {
38 1
        $this->rule = $rule;
39 1
        $this->result = $result;
40 1
    }
41
42
    /**
43
     * get the rule for which this result applies
44
     * 
45
     * @return Rule
46
     */
47 1
    public function getRule()
48
    {
49 1
        return $this->rule;
50
    }
51
52
    /**
53
     * get the result
54
     * 
55
     * @return string
56
     */
57 1
    public function getResult()
58
    {
59 1
        return $this->result;
60
    }
61
}
62