Total Complexity | 11 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | final class Attribute |
||
9 | { |
||
10 | private $value; |
||
11 | private $attribute; |
||
12 | |||
13 | /** |
||
14 | * @param string $attribute |
||
15 | * @param mixed $value |
||
16 | */ |
||
17 | public function __construct($attribute, $value = null) |
||
21 | } |
||
22 | |||
23 | public function getName() |
||
24 | { |
||
25 | return $this->attribute; |
||
26 | } |
||
27 | |||
28 | public function getValue() |
||
29 | { |
||
30 | return $this->value; |
||
31 | } |
||
32 | |||
33 | public function canSkip(RuleInterface $rule) |
||
34 | { |
||
35 | return $rule instanceof Sometimes && $this->isEmpty(); |
||
36 | } |
||
37 | |||
38 | public function conformsTo(RuleInterface $rule) |
||
43 | } |
||
44 | |||
45 | public function isEmpty() |
||
48 | } |
||
49 | } |
||
50 |