Total Complexity | 4 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
12 | trait HasItemTrait |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * @var Record |
||
17 | */ |
||
18 | protected $item; |
||
19 | |||
20 | /** |
||
21 | * @return Record |
||
22 | */ |
||
23 | 9 | public function getItem() |
|
24 | { |
||
25 | 9 | return $this->item; |
|
26 | } |
||
27 | |||
28 | /** |
||
29 | * @param Record|HasRelationsRecordTrait $item |
||
30 | * @return $this |
||
31 | */ |
||
32 | 10 | public function setItem(Record $item) |
|
33 | { |
||
34 | 10 | $this->item = $item; |
|
35 | |||
36 | 10 | return $this; |
|
37 | } |
||
38 | |||
39 | /** |
||
40 | * @return mixed |
||
41 | */ |
||
42 | 2 | public function getItemRelationPrimaryKey() |
|
46 | } |
||
47 | |||
48 | /** |
||
49 | * @param $key |
||
50 | * @return mixed |
||
51 | */ |
||
52 | 2 | public function getItemValue($key) |
|
57 |