1 | <?php |
||
26 | class PostconditionCheckerAspect extends AbstractContractAspect implements Aspect |
||
27 | { |
||
28 | /** |
||
29 | * @var MethodConditionFetcher |
||
30 | */ |
||
31 | private $methodConditionFetcher; |
||
32 | |||
33 | public function __construct(Reader $reader) |
||
38 | |||
39 | /** |
||
40 | * Verifies post-condition contract for the method |
||
41 | * |
||
42 | * @Around("@execution(PhpDeal\Annotation\Ensure)") |
||
43 | * @param MethodInvocation $invocation |
||
44 | * |
||
45 | * @throws ContractViolation |
||
46 | * @throws \ReflectionException |
||
47 | * @return mixed |
||
48 | */ |
||
49 | 8 | public function postConditionContract(MethodInvocation $invocation) |
|
66 | |||
67 | /** |
||
68 | * @param MethodInvocation $invocation |
||
69 | * @return array |
||
70 | * @throws \ReflectionException |
||
71 | */ |
||
72 | 8 | private function fetchAllContracts(MethodInvocation $invocation): array |
|
86 | |||
87 | /** |
||
88 | * @param MethodInvocation $invocation |
||
89 | * @return array |
||
90 | * @throws \ReflectionException |
||
91 | */ |
||
92 | 8 | private function fetchParentsContracts(MethodInvocation $invocation): array |
|
99 | } |
||
100 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.