ItemDetail::getPrice()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
ccs 0
cts 1
cp 0
crap 2
1
<?php
2
3
namespace Simara\Cart\Domain\Cart;
4
5
use Simara\Cart\Domain\Price;
6
7
final class ItemDetail
8
{
9
    public function __construct(
10
        private string $productId,
11
        private Price $price,
12
        private int $amount
13
    ) {
14
    }
15 17
16
    public function getProductId(): string
17 17
    {
18 17
        return $this->productId;
19 17
    }
20 17
21
    public function getAmount(): int
22
    {
23
        return $this->amount;
24
    }
25
26
    public function getPrice(): Price
27
    {
28
        return $this->price;
29
    }
30
}
31