KabsaRelationships::hasManyKabsaRows()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 3
1
<?php
2
3
4
namespace Awssat\Kabsa\Traits;
5
6
use Awssat\Kabsa\Relationships\BelongsToCached;
7
use Awssat\Kabsa\Relationships\HasManyCached;
8
9
trait KabsaRelationships
10
{
11
    public function belongsToKabsaRow($related,  $foreignKey = null, $ownerKey = null)
12
    {
13
        return new BelongsToCached($related, $this, $foreignKey, $ownerKey);
0 ignored issues
show
Bug introduced by
$this of type Awssat\Kabsa\Traits\KabsaRelationships is incompatible with the type Illuminate\Database\Eloquent\Model expected by parameter $parent of Awssat\Kabsa\Relationshi...ToCached::__construct(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

13
        return new BelongsToCached($related, /** @scrutinizer ignore-type */ $this, $foreignKey, $ownerKey);
Loading history...
14
    }
15
16
    public function hasManyKabsaRows($related,  $foreignKey = null, $ownerKey = null)
17
    {
18
        return new HasManyCached($related, $this, $foreignKey, $ownerKey);
0 ignored issues
show
Bug introduced by
$this of type Awssat\Kabsa\Traits\KabsaRelationships is incompatible with the type Illuminate\Database\Eloquent\Model expected by parameter $parent of Awssat\Kabsa\Relationshi...nyCached::__construct(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

18
        return new HasManyCached($related, /** @scrutinizer ignore-type */ $this, $foreignKey, $ownerKey);
Loading history...
19
    }
20
}