| Total Complexity | 4 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 14 | final class Inversed extends AbstractAnnotation |
||
| 15 | { |
||
| 16 | protected const INVERSED = 'inversed'; |
||
| 17 | protected const SCHEMA = [ |
||
| 18 | 'type' => Parser::STRING, |
||
| 19 | 'name' => Parser::STRING |
||
| 20 | ]; |
||
| 21 | |||
| 22 | /** @var string|null */ |
||
| 23 | protected $type; |
||
| 24 | |||
| 25 | /** @var string|null */ |
||
| 26 | protected $name; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @return bool |
||
| 30 | */ |
||
| 31 | public function isValid(): bool |
||
| 32 | { |
||
| 33 | return $this->type !== null && $this->name !== null; |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @return string|null |
||
| 38 | */ |
||
| 39 | public function getType(): ?string |
||
| 40 | { |
||
| 41 | return $this->type; |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @return string|null |
||
| 46 | */ |
||
| 47 | public function getRelation(): ?string |
||
| 50 | } |
||
| 51 | } |