Passed
Push — master ( 571547...7a0005 )
by Jasper
03:20
created

MorphToRelation::associate()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 14
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 2.0625

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 14
ccs 6
cts 8
cp 0.75
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 1
crap 2.0625
1
<?php
2
3
namespace Swis\JsonApi\Client\Relations;
4
5
use Swis\JsonApi\Client\Interfaces\ItemInterface;
6
7
class MorphToRelation extends AbstractOneRelation
8
{
9
    /**
10
     * @var \Swis\JsonApi\Client\Interfaces\ItemInterface
11
     */
12
    protected $parentItem;
13
14
    /**
15
     * @param \Swis\JsonApi\Client\Interfaces\ItemInterface $item
16
     */
17 35
    public function __construct(ItemInterface $item)
18
    {
19 35
        $this->parentItem = $item;
20 35
    }
21
}
22