| 1 | <?php |
||
| 6 | class StatusCheckerGroup |
||
| 7 | { |
||
| 8 | /** @var string */ |
||
| 9 | protected $title; |
||
| 10 | |||
| 11 | /** @var AbstractCheck[] */ |
||
| 12 | protected $checks = []; |
||
| 13 | |||
| 14 | /** @var Result[] */ |
||
| 15 | protected $results = array(); |
||
| 16 | |||
| 17 | |||
| 18 | /** |
||
| 19 | * StatusCheckerGroup constructor. |
||
| 20 | * @param string $title |
||
| 21 | */ |
||
| 22 | public function __construct(string $title) |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @return string |
||
| 29 | */ |
||
| 30 | public function getTitle(): string |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Adds check to the group. |
||
| 37 | * |
||
| 38 | * @param AbstractCheck $checker |
||
| 39 | */ |
||
| 40 | public function addCheck(AbstractCheck $checker) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Runs all added checks. |
||
| 47 | */ |
||
| 48 | public function check() |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Returns results of all run checks. |
||
| 57 | * |
||
| 58 | * @return Result[] |
||
| 59 | */ |
||
| 60 | public function getResults(): array |
||
| 64 | |||
| 65 | /** |
||
| 66 | * Returns if there is an erroneous result in this group. |
||
| 67 | * |
||
| 68 | * @return bool |
||
| 69 | */ |
||
| 70 | public function hasErrors(): bool |
||
| 81 | } |
||
| 82 |