| Conditions | 7 |
| Paths | 5 |
| Total Lines | 21 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function isCompatible(AssociationStubBase $otherStub) |
||
| 34 | { |
||
| 35 | if (!parent::isCompatible($otherStub)) { |
||
| 36 | return false; |
||
| 37 | } |
||
| 38 | $thisTarg = $this->getTargType(); |
||
| 39 | $thatTarg = $otherStub->getTargType(); |
||
| 40 | $thisNull = null === $thisTarg; |
||
| 41 | $thatNull = null === $thatTarg; |
||
| 42 | if ($thisNull == $thatNull) { |
||
| 43 | return false; |
||
| 44 | } |
||
| 45 | if ($thisNull && ($thatTarg != $this->getBaseType())) { |
||
| 46 | return false; |
||
| 47 | } |
||
| 48 | if ($thatNull && ($thisTarg != $otherStub->getBaseType())) { |
||
| 49 | return false; |
||
| 50 | } |
||
| 51 | |||
| 52 | return true; |
||
| 53 | } |
||
| 54 | |||
| 61 |