1 | <?php |
||
19 | class InheritCheckerAspect extends AbstractContractAspect implements Aspect |
||
20 | { |
||
21 | /** |
||
22 | * @var MethodConditionFetcher |
||
23 | */ |
||
24 | private $methodConditionFetcher; |
||
25 | |||
26 | /** @var InvariantFetcher */ |
||
27 | private $invariantFetcher; |
||
28 | |||
29 | public function __construct(Reader $reader) |
||
39 | |||
40 | /** |
||
41 | * Verifies inherit contracts for the method |
||
42 | * |
||
43 | * @Around("@execution(PhpDeal\Annotation\Inherit)") |
||
44 | * @param MethodInvocation $invocation |
||
45 | * |
||
46 | * @throws ContractViolation |
||
47 | * @throws \ReflectionException |
||
48 | * @return mixed |
||
49 | */ |
||
50 | 2 | public function inheritMethodContracts(MethodInvocation $invocation) |
|
67 | |||
68 | /** |
||
69 | * @Around("@within(PhpDeal\Annotation\Inherit) && execution(public **->*(*))") |
||
70 | * @param MethodInvocation $invocation |
||
71 | * @return mixed |
||
72 | * @throws \ReflectionException |
||
73 | */ |
||
74 | public function inheritClassContracts(MethodInvocation $invocation) |
||
91 | |||
92 | /** |
||
93 | * @param MethodInvocation $invocation |
||
94 | * @return array |
||
95 | * @throws \ReflectionException |
||
96 | */ |
||
97 | 2 | private function fetchMethodContracts(MethodInvocation $invocation): array |
|
113 | |||
114 | /** |
||
115 | * @param MethodInvocation $invocation |
||
116 | * @return array |
||
117 | * @throws \ReflectionException |
||
118 | */ |
||
119 | 2 | private function fetchParentsMethodContracts(MethodInvocation $invocation): array |
|
126 | |||
127 | /** |
||
128 | * @param ReflectionClass $class |
||
129 | * @return array |
||
130 | */ |
||
131 | private function fetchClassContracts(ReflectionClass $class): array |
||
142 | } |
||
143 |
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.