Completed
Push — master ( b1578e...6e5d14 )
by Tomáš
04:02
created

PackageData::setInsCurrency()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
ccs 3
cts 3
cp 1
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Inspirum\Balikobot\Model\Values\Package;
4
5
use Inspirum\Balikobot\Definitions\Option;
6
7
trait PackageData
8
{
9
    /**
10
     * Set the item at a given offset
11
     *
12
     * @param string $key
13
     * @param mixed  $value
14
     *
15
     * @return void
16
     */
17
    abstract public function offsetSet($key, $value);
18
19
    /**
20
     * @param float $width
21
     *
22
     * @return void
23
     */
24 1
    public function setWidth(float $width): void
25
    {
26 1
        $this->offsetSet(Option::WIDTH, $width);
27 1
    }
28
29
    /**
30
     * @param float $length
31
     *
32
     * @return void
33
     */
34 1
    public function setLength(float $length): void
35
    {
36 1
        $this->offsetSet(Option::LENGTH, $length);
37 1
    }
38
39
    /**
40
     * @param float $height
41
     *
42
     * @return void
43
     */
44 1
    public function setHeigth(float $height): void
45
    {
46 1
        $this->offsetSet(Option::HEIGHT, $height);
47 1
    }
48
49
    /**
50
     * @param float $weight
51
     *
52
     * @return void
53
     */
54 1
    public function setWeight(float $weight): void
55
    {
56 1
        $this->offsetSet(Option::WEIGHT, $weight);
57 1
    }
58
59
    /**
60
     * @param float $price
61
     *
62
     * @return void
63
     */
64 2
    public function setPrice(float $price): void
65
    {
66 2
        $this->offsetSet(Option::PRICE, $price);
67 2
    }
68
69
    /**
70
     * @param float $volume
71
     *
72
     * @return void
73
     */
74 1
    public function setVolume(float $volume): void
75
    {
76 1
        $this->offsetSet(Option::VOLUME, $volume);
77 1
    }
78
79
    /**
80
     * @param bool $overDimension
81
     *
82
     * @return void
83
     */
84 1
    public function setOverDimension(bool $overDimension = true): void
85
    {
86 1
        $this->offsetSet(Option::OVER_DIMENSION, (int) $overDimension);
87 1
    }
88
89
    /**
90
     * @param string $currency
91
     *
92
     * @return void
93
     */
94 1
    public function setInsCurrency(string $currency): void
95
    {
96 1
        $this->offsetSet(Option::INS_CURRENCY, $currency);
97 1
    }
98
}
99