Passed
Branch master (837a03)
by Tomáš
02:48
created

PackageTransportCostPart::getCurrencyCode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
namespace Inspirum\Balikobot\Model\Values;
4
5
class PackageTransportCostPart
6
{
7
    /**
8
     * Part name
9
     *
10
     * @var string
11
     */
12
    private $name;
13
14
    /**
15
     * Part cost
16
     *
17
     * @var float
18
     */
19
    private $cost;
20
21
    /**
22
     * Currency code
23
     *
24
     * @var string
25
     */
26
    private $currencyCode;
27
28
    /**
29
     * PackageTransportCost constructor
30
     *
31
     * @param string $name
32
     * @param float  $cost
33
     * @param string $currencyCode
34
     */
35 4
    public function __construct(string $name, float $cost, string $currencyCode)
36
    {
37 4
        $this->name         = $name;
38 4
        $this->cost         = $cost;
39 4
        $this->currencyCode = $currencyCode;
40 4
    }
41
42
    /**
43
     * @return string
44
     */
45 1
    public function getName(): string
46
    {
47 1
        return $this->name;
48
    }
49
50
    /**
51
     * @return float
52
     */
53 1
    public function getCost(): float
54
    {
55 1
        return $this->cost;
56
    }
57
58
    /**
59
     * @return string
60
     */
61 1
    public function getCurrencyCode(): string
62
    {
63 1
        return $this->currencyCode;
64
    }
65
}
66