Conditions | 6 |
Paths | 6 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | public function isCompatible(AssociationStubBase $otherStub): bool |
||
15 | { |
||
16 | if (!parent::isCompatible($otherStub)) { |
||
17 | return false; |
||
18 | } |
||
19 | |||
20 | if ($this->getThroughFieldChain() !== array_reverse($otherStub->getThroughFieldChain())) { |
||
21 | return false; |
||
22 | } |
||
23 | |||
24 | return ($this->getTargType() === $otherStub->getBaseType()) |
||
25 | && ($this->getBaseType() === $otherStub->getTargType()) |
||
26 | && ($this->getForeignFieldName() === $otherStub->getKeyFieldName()) |
||
27 | && ($this->getKeyFieldName() === $otherStub->getForeignFieldName()); |
||
28 | } |
||
49 |