| 1 | <?php |
||
| 13 | abstract class AbstractInspection implements InspectionInterface |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var array |
||
| 17 | */ |
||
| 18 | private $issues = []; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param $object |
||
| 22 | * @return bool |
||
| 23 | */ |
||
| 24 | abstract public function inspect($object):bool; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param mixed $object |
||
| 28 | * @return bool |
||
| 29 | */ |
||
| 30 | abstract public function supports($object):bool; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * |
||
| 34 | */ |
||
| 35 | 2 | public function success() |
|
| 39 | |||
| 40 | /** |
||
| 41 | * you probably want to override this |
||
| 42 | * @throws StateInspectorException |
||
| 43 | */ |
||
| 44 | public function failure() |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @param IssueInterface $issue |
||
| 57 | */ |
||
| 58 | 2 | public function addIssue(IssueInterface $issue) |
|
| 62 | |||
| 63 | /** |
||
| 64 | * @return IssueInterface[] |
||
| 65 | */ |
||
| 66 | 3 | public function getIssues():array |
|
| 70 | } |
||
| 71 |