| Conditions | 6 |
| Paths | 5 |
| Total Lines | 22 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 7 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 37 | public function isCompatible(AssociationStubBase $otherStub): bool |
||
| 38 | { |
||
| 39 | if (!parent::isCompatible($otherStub)) { |
||
| 40 | return false; |
||
| 41 | } |
||
| 42 | |||
| 43 | if (null === $this->getTargType() && null === $otherStub->getTargType()) { |
||
| 44 | return false; |
||
| 45 | } |
||
| 46 | |||
| 47 | $thisBase = $this->getBaseType(); |
||
| 48 | $thatBase = $otherStub->getBaseType(); |
||
| 49 | $thatTarg = $otherStub->getTargType() ?? $thisBase; |
||
| 50 | $thisTarg = $this->getTargType() ?? $thatBase; |
||
| 51 | if ($thatTarg != $thisBase) { |
||
| 52 | return false; |
||
| 53 | } |
||
| 54 | if ($thisTarg != $thatBase) { |
||
| 55 | return false; |
||
| 56 | } |
||
| 57 | |||
| 58 | return true; |
||
| 59 | } |
||
| 69 |