Passed
Push — master ( f112c9...a480d7 )
by Gabriel
02:57
created

HasItemTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
c 1
b 0
f 0
dl 0
loc 23
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getItem() 0 3 1
A setItem() 0 5 1
1
<?php
2
3
namespace ByTIC\Models\SmartProperties\Properties\AbstractProperty\Traits;
4
5
use ByTIC\Models\SmartProperties\Properties\AbstractProperty\Generic;
6
use Nip\Records\Record as Record;
7
8
/**
9
 * Trait HasItemTrait
10
 * @package ByTIC\Models\SmartProperties\Properties\AbstractProperty\Traits
11
 */
12
trait HasItemTrait
13
{
14
    /**
15
     * @var null|Record
16
     */
17
    protected $item;
18
    /**
19
     * @return Record|null
20
     */
21
    public function getItem()
22
    {
23
        return $this->item;
24
    }
25
26
    /**
27
     * @param $i
28
     * @return $this
29
     */
30
    public function setItem($i)
31
    {
32
        $this->item = $i;
33
34
        return $this;
35
    }
36
37
}