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

AssociationStubMonomorphic   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 13
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A isCompatible() 0 10 3
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