| 1 | <?php |
||
| 20 | class InvariantCheckerAspect implements Aspect |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var InvariantContract |
||
| 24 | */ |
||
| 25 | private $contractChecker; |
||
| 26 | |||
| 27 | public function __construct(Reader $reader) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Verifies invariants for contract class |
||
| 34 | * |
||
| 35 | * @Around("@within(PhpDeal\Annotation\Invariant) && execution(public **->*(*))") |
||
| 36 | * @param MethodInvocation $invocation |
||
| 37 | * |
||
| 38 | * @throws ContractViolation |
||
| 39 | * @return mixed |
||
| 40 | */ |
||
| 41 | 7 | public function invariantContract(MethodInvocation $invocation) |
|
| 45 | } |
||
| 46 |