1 | <?php |
||
20 | class APIConnectionCheck implements CheckInterface |
||
21 | { |
||
22 | |||
23 | /** |
||
24 | * DataService object |
||
25 | * |
||
26 | * @var DataServiceInterface |
||
27 | */ |
||
28 | protected $dataService; |
||
29 | |||
30 | /** |
||
31 | * Version of Gerrit instance |
||
32 | * |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $version; |
||
36 | |||
37 | 5 | public function __construct(DataServiceInterface $dataService) |
|
41 | |||
42 | /** |
||
43 | * Executes the check itselfs |
||
44 | * |
||
45 | * @return boolean |
||
46 | */ |
||
47 | 2 | public function check() |
|
65 | |||
66 | /** |
||
67 | * Returns the message, if the check succeeded |
||
68 | * |
||
69 | * @return string |
||
70 | */ |
||
71 | 1 | public function getSuccessMessage() |
|
78 | |||
79 | /** |
||
80 | * Returns the message, if the check fails |
||
81 | * |
||
82 | * @return string |
||
83 | */ |
||
84 | 1 | public function getFailureMessage() |
|
92 | |||
93 | /** |
||
94 | * Returns if this check is optional or required. |
||
95 | * |
||
96 | * @return bool |
||
97 | */ |
||
98 | 1 | public function isOptional() |
|
102 | } |
||
103 |