1 | <?php |
||
25 | class PostconditionCheckerAspect extends AbstractContractAspect implements Aspect |
||
26 | { |
||
27 | /** |
||
28 | * @var MethodConditionFetcher |
||
29 | */ |
||
30 | private $methodConditionFetcher; |
||
31 | |||
32 | public function __construct(Reader $reader) |
||
37 | |||
38 | /** |
||
39 | * Verifies post-condition contract for the method |
||
40 | * |
||
41 | * @Around("@execution(PhpDeal\Annotation\Ensure)") |
||
42 | * @param MethodInvocation $invocation |
||
43 | * |
||
44 | * @throws ContractViolation |
||
45 | * @throws \ReflectionException |
||
46 | * @return mixed |
||
47 | */ |
||
48 | 8 | public function postConditionContract(MethodInvocation $invocation) |
|
65 | |||
66 | /** |
||
67 | * @param MethodInvocation $invocation |
||
68 | * @return array |
||
69 | * @throws \ReflectionException |
||
70 | */ |
||
71 | 8 | private function fetchAllContracts(MethodInvocation $invocation): array |
|
85 | |||
86 | /** |
||
87 | * @param MethodInvocation $invocation |
||
88 | * @return array |
||
89 | * @throws \ReflectionException |
||
90 | */ |
||
91 | 8 | private function fetchParentsContracts(MethodInvocation $invocation): array |
|
98 | } |
||
99 |
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.