1 | <?php |
||
10 | abstract class AbstractCheck implements CheckInterface |
||
11 | { |
||
12 | /** |
||
13 | * @var null|string |
||
14 | */ |
||
15 | protected $checkNode = self::CHECK_NODE_DEFAULT; |
||
16 | |||
17 | /** |
||
18 | * @var ResultInterface |
||
19 | */ |
||
20 | protected $lastCheckResult = null; |
||
21 | |||
22 | /** |
||
23 | * AbstractCheck constructor. |
||
24 | * |
||
25 | * @param null $checkNode |
||
26 | */ |
||
27 | 7 | public function __construct($checkNode = null) |
|
28 | { |
||
29 | 7 | if (null !== $checkNode) { |
|
30 | 7 | $this->setCheckNode($checkNode); |
|
31 | 7 | } |
|
32 | 7 | } |
|
33 | |||
34 | /** |
||
35 | * @return string |
||
36 | */ |
||
37 | 2 | public function getCheckComponent() |
|
38 | { |
||
39 | 2 | return static::COMPONENT; |
|
40 | } |
||
41 | |||
42 | /** |
||
43 | * @return string |
||
44 | */ |
||
45 | 2 | public function getCheckGroup() |
|
46 | { |
||
47 | 2 | return static::GROUP; |
|
48 | } |
||
49 | |||
50 | /** |
||
51 | * @return null|string |
||
52 | */ |
||
53 | 2 | public function getCheckNode() |
|
54 | { |
||
55 | 2 | return $this->checkNode; |
|
56 | } |
||
57 | |||
58 | /** |
||
59 | * @return string |
||
60 | */ |
||
61 | 2 | public function getCheckIdent() |
|
65 | |||
66 | /** |
||
67 | * @return null|string |
||
68 | */ |
||
69 | 2 | public function getIndent() |
|
73 | |||
74 | /** |
||
75 | * @return null|string |
||
76 | */ |
||
77 | 1 | public function getLabel() |
|
81 | |||
82 | /** |
||
83 | * @return ResultInterface |
||
84 | */ |
||
85 | 1 | public function getLastCheckResult() |
|
89 | |||
90 | /** |
||
91 | * @return ResultInterface |
||
92 | */ |
||
93 | 4 | public function check() |
|
109 | |||
110 | /** |
||
111 | * @param string $checkNode |
||
112 | */ |
||
113 | 7 | protected function setCheckNode($checkNode) |
|
117 | |||
118 | /** |
||
119 | * @param ResultInterface $lastCheckResult |
||
120 | */ |
||
121 | 4 | protected function setLastCheckResult(ResultInterface $lastCheckResult) |
|
125 | } |
||
126 |