ItemList   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 16
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A add() 0 4 1
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