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

PackageTransportCostPart   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 59
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 59
ccs 11
cts 11
cp 1
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getCurrencyCode() 0 3 1
A getName() 0 3 1
A getCost() 0 3 1
A __construct() 0 5 1
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