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