1 | <?php |
||
21 | class PostconditionCheckerAspect extends AbstractContractAspect implements Aspect |
||
22 | { |
||
23 | /** |
||
24 | * @var MethodConditionFetcher |
||
25 | */ |
||
26 | private $methodConditionFetcher; |
||
27 | |||
28 | public function __construct(Reader $reader) |
||
33 | |||
34 | /** |
||
35 | * Verifies post-condition contract for the method |
||
36 | * |
||
37 | * @Around("@execution(PhpDeal\Annotation\Ensure)") |
||
38 | * @param MethodInvocation $invocation |
||
39 | * |
||
40 | * @throws ContractViolation |
||
41 | * @return mixed |
||
42 | */ |
||
43 | 8 | public function postConditionContract(MethodInvocation $invocation) |
|
60 | |||
61 | /** |
||
62 | * @param MethodInvocation $invocation |
||
63 | * @return array |
||
64 | */ |
||
65 | 8 | private function fetchAllContracts(MethodInvocation $invocation) |
|
76 | |||
77 | /** |
||
78 | * @param MethodInvocation $invocation |
||
79 | * @return array |
||
80 | */ |
||
81 | 8 | private function fetchParentsContracts(MethodInvocation $invocation) |
|
88 | } |
||
89 |