ItemList::add()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * @category    Brownie/CartsGuru
4
 * @author      Brownie <[email protected]>
5
 * @license     http://www.gnu.org/copyleft/lesser.html
6
 */
7
8
namespace Brownie\CartsGuru\Model;
9
10
use Brownie\CartsGuru\Model\Base\EntityList;
11
12
/**
13
 * Item list.
14
 */
15
class ItemList extends EntityList
16
{
17
18
    protected $keyName = 'items';
19
20
    /**
21
     * Add product.
22
     *
23
     * @param Item  $item   Product.
24
     *
25
     * @return self
26
     */
27 3
    public function add(Item $item)
28
    {
29 3
        parent::append($item);
30 3
        return $this;
31
    }
32
}
33