1 | <?php |
||
21 | class PreconditionCheckerAspect extends AbstractContractAspect implements Aspect |
||
22 | { |
||
23 | /** |
||
24 | * @var MethodConditionWithInheritDocFetcher |
||
25 | */ |
||
26 | private $methodConditionFetcher; |
||
27 | |||
28 | public function __construct(Reader $reader) |
||
33 | |||
34 | /** |
||
35 | * Verifies pre-condition contract for the method |
||
36 | * |
||
37 | * @param MethodInvocation $invocation |
||
38 | * @Before("@execution(PhpDeal\Annotation\Verify)") |
||
39 | * |
||
40 | * @throws ContractViolation |
||
41 | */ |
||
42 | 19 | public function preConditionContract(MethodInvocation $invocation) |
|
51 | |||
52 | /** |
||
53 | * @param MethodInvocation $invocation |
||
54 | * @return array |
||
55 | */ |
||
56 | 19 | private function fetchAllContracts(MethodInvocation $invocation) |
|
68 | |||
69 | /** |
||
70 | * @param MethodInvocation $invocation |
||
71 | * @return array |
||
72 | */ |
||
73 | 19 | private function fetchParentsContracts(MethodInvocation $invocation) |
|
80 | } |
||
81 |