Price::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 2
c 1
b 0
f 1
nc 1
nop 2
dl 0
loc 7
rs 10
ccs 3
cts 3
cp 1
crap 1
1
<?php declare(strict_types = 1);
2
3
namespace SlevomatCsobGateway;
4
5
class Price
6
{
7
8
	/** @var int */
9
	private $amount;
10
11
	/** @var Currency */
12
	private $currency;
13
14 8
	public function __construct(
15
		int $amount,
16
		Currency $currency
17
	)
18
	{
19 8
		$this->amount = $amount;
20 8
		$this->currency = $currency;
21 8
	}
22
23 5
	public function getAmount(): int
24
	{
25 5
		return $this->amount;
26
	}
27
28 5
	public function getCurrency(): Currency
29
	{
30 5
		return $this->currency;
31
	}
32
33
}
34