Test Failed
Pull Request — master (#10)
by Laurens
01:52
created

Variant   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 0
dl 0
loc 47
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 13 1
A getLocationUuid() 0 4 1
A getLocationType() 0 4 1
A getProductUuid() 0 4 1
A getVariantUuid() 0 4 1
A getBalance() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace LauLamanApps\IzettleApi\API\Inventory\Location;
6
7
use Ramsey\Uuid\UuidInterface;
8
9
final class Variant
10
{
11
    private $locationUuid;
12
    private $locationType;
13
    private $productUuid;
14
    private $variantUuid;
15
    private $balance;
16
17
    public function __construct(
18
        UuidInterface $locationUuid,
19
        TypeEnum $locationType,
20
        UuidInterface $productUuid,
21
        UuidInterface $variantUuid,
22
        int $balance
23
    ) {
24
        $this->locationUuid = $locationUuid;
25
        $this->locationType = $locationType;
26
        $this->productUuid = $productUuid;
27
        $this->variantUuid = $variantUuid;
28
        $this->balance = $balance;
29
    }
30
31
    public function getLocationUuid(): UuidInterface
32
    {
33
        return $this->locationUuid;
34
    }
35
36
    public function getLocationType(): TypeEnum
37
    {
38
        return $this->locationType;
39
    }
40
41
    public function getProductUuid(): UuidInterface
42
    {
43
        return $this->productUuid;
44
    }
45
46
    public function getVariantUuid(): UuidInterface
47
    {
48
        return $this->variantUuid;
49
    }
50
51
    public function getBalance(): int
52
    {
53
        return $this->balance;
54
    }
55
}
56