ParcelData::setTransformTempFrom()   A
last analyzed

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 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Inspirum\Balikobot\Model\PackageData\Package;
6
7
use Inspirum\Balikobot\Definitions\Attribute;
8
9
trait ParcelData
10
{
11 1
    public function setWidth(float $width): void
12
    {
13 1
        $this->offsetSet(Attribute::WIDTH, $width);
0 ignored issues
show
Bug introduced by
It seems like offsetSet() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

13
        $this->/** @scrutinizer ignore-call */ 
14
               offsetSet(Attribute::WIDTH, $width);
Loading history...
14
    }
15
16 1
    public function setLength(float $length): void
17
    {
18 1
        $this->offsetSet(Attribute::LENGTH, $length);
19
    }
20
21 1
    public function setHeight(float $height): void
22
    {
23 1
        $this->offsetSet(Attribute::HEIGHT, $height);
24
    }
25
26 7
    public function setWeight(float $weight): void
27
    {
28 7
        $this->offsetSet(Attribute::WEIGHT, $weight);
29
    }
30
31 19
    public function setPrice(float $price): void
32
    {
33 19
        $this->offsetSet(Attribute::PRICE, $price);
34
    }
35
36 1
    public function setVolume(float $volume): void
37
    {
38 1
        $this->offsetSet(Attribute::VOLUME, $volume);
39
    }
40
41 1
    public function setOverDimension(bool $overDimension = true): void
42
    {
43 1
        $this->offsetSet(Attribute::OVER_DIMENSION, (int) $overDimension);
44
    }
45
46 1
    public function setInsCurrency(string $currency): void
47
    {
48 1
        $this->offsetSet(Attribute::INS_CURRENCY, $currency);
49
    }
50
51 1
    public function setSize(string $size): void
52
    {
53 1
        $this->offsetSet(Attribute::SIZE, $size);
54
    }
55
56 1
    public function setLoadingLengthPallets(float $length): void
57
    {
58 1
        $this->offsetSet(Attribute::LOADING_LENGTH_PALLETS, $length);
59
    }
60
61 1
    public function setTransformTempFrom(float $temp): void
62
    {
63 1
        $this->offsetSet(Attribute::TRANSFORM_TEMP_FROM, $temp);
64
    }
65
66 1
    public function setTransformTempTo(float $temp): void
67
    {
68 1
        $this->offsetSet(Attribute::TRANSFORM_TEMP_TO, $temp);
69
    }
70
}
71