| Total Complexity | 7 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class AssociationMonomorphic extends Association |
||
| 8 | { |
||
| 9 | |||
| 10 | /** |
||
| 11 | * @var AssociationStubBase |
||
| 12 | */ |
||
| 13 | protected $last; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @return AssociationStubBase |
||
| 17 | */ |
||
| 18 | public function getLast(): AssociationStubBase |
||
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param AssociationStubBase $last |
||
| 25 | */ |
||
| 26 | public function setLast(AssociationStubBase $last): void |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @return bool |
||
| 34 | */ |
||
| 35 | public function isOk(): bool |
||
| 36 | { |
||
| 37 | $first = $this->getFirst(); |
||
| 38 | $last = $this->getLast(); |
||
| 39 | if (!$first->isOk()) { |
||
| 40 | return false; |
||
| 41 | } |
||
| 42 | if (!$last->isOk()) { |
||
| 43 | return false; |
||
| 44 | } |
||
| 45 | if (!$first->isCompatible($last)) { |
||
| 46 | return false; |
||
| 47 | } |
||
| 48 | return -1 === $first->compare($last); |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @return \AlgoWeb\PODataLaravel\Models\ObjectMap\Entities\Associations\AssociationType |
||
| 53 | */ |
||
| 54 | public function getAssociationType(): AssociationType |
||
| 58 | } |
||
| 59 | } |
||
| 60 |