Test Failed
Pull Request — master (#115)
by Alex
03:27
created

AssociationStubMonomorphic::isCompatible()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
cc 3
eloc 6
nc 3
nop 1
1
<?php
2
3
namespace AlgoWeb\PODataLaravel\Models;
4
5
class AssociationStubMonomorphic extends AssociationStubBase
6
{
7
    public function isCompatible(AssociationStubBase $otherStub)
8
    {
9
        if (!parent::isCompatible($otherStub)) {
10
            return false;
11
        }
12
        if ($this->getForeignField() !== $otherStub->getKeyField()) {
0 ignored issues
show
Unused Code introduced by
This if statement, and the following return statement can be replaced with return !($this->getForei...erStub->getKeyField());.
Loading history...
13
            return false;
14
        }
15
        return true;
16
    }
17
}
18