Test Failed
Pull Request — master (#7)
by Svaťa
05:11
created

CartDetail::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Simara\Cart\Domain\Cart;
4
5
use Simara\Cart\Domain\Price;
6
7
class CartDetail
8
{
9
    /**
10
     * @var ItemDetail[]
11
	 */
12
    private array $items;
13
14
    private Price $totalPrice;
15
16
    /**
17
     * @param ItemDetail[] $items
18
     */
19
    public function __construct(array $items, Price $totalPrice)
20
    {
21
        $this->items = $items;
22
        $this->totalPrice = $totalPrice;
23
    }
24
25
    /**
26
     * @return ItemDetail[]
27
	 */
28
    public function getItems(): array
29
    {
30
        return $this->items;
31
    }
32
33
    public function getTotalPrice(): Price
34
	{
35
        return $this->totalPrice;
36
    }
37
}
38