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

ItemDetail::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 3
dl 0
loc 5
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 ItemDetail
8
{
9
    private string $productId;
10
11
    private Price $price;
12
13
    private int $amount;
14
15
    public function __construct(string $productId, Price $price, int $amount)
16
    {
17
        $this->productId = $productId;
18
        $this->amount = $amount;
19
        $this->price = $price;
20
    }
21
22
    public function getProductId(): string
23
    {
24
        return $this->productId;
25
    }
26
27
    public function getAmount(): int
28
    {
29
        return $this->amount;
30
    }
31
32
    public function getPrice(): Price
33
	{
34
        return $this->price;
35
    }
36
}
37