Passed
Push — master ( 9ff768...b736eb )
by Laurens
02:33
created

Library   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 7
lcom 0
cbo 0
dl 0
loc 55
ccs 20
cts 20
cp 1
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 15 1
A getFromEventLogUuid() 0 4 1
A getUntilEventLogUuid() 0 4 1
A getProducts() 0 4 1
A getDiscounts() 0 4 1
A getDeletedProducts() 0 4 1
A getDeletedDiscounts() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace LauLamanApps\IzettleApi\API\Product;
6
7
use Ramsey\Uuid\UuidInterface;
8
9
final class Library
10
{
11
    private $fromEventLogUuid;
12
    private $untilEventLogUuid;
13
    private $products;
14
    private $discounts;
15
    private $deletedProducts;
16
    private $deletedDiscounts;
17
18 2
    public function __construct(
19
        UuidInterface $fromEventLogUuid,
20
        UuidInterface $untilEventLogUuid,
21
        ProductCollection $products,
22
        DiscountCollection $discounts,
23
        ProductCollection $deletedProducts,
24
        DiscountCollection $deletedDiscounts
25
    ) {
26 2
        $this->fromEventLogUuid = $fromEventLogUuid;
27 2
        $this->untilEventLogUuid = $untilEventLogUuid;
28 2
        $this->products = $products;
29 2
        $this->discounts = $discounts;
30 2
        $this->deletedProducts = $deletedProducts;
31 2
        $this->deletedDiscounts = $deletedDiscounts;
32 2
    }
33
34 1
    public function getFromEventLogUuid(): UuidInterface
35
    {
36 1
        return $this->fromEventLogUuid;
37
    }
38
39 1
    public function getUntilEventLogUuid(): UuidInterface
40
    {
41 1
        return $this->untilEventLogUuid;
42
    }
43
44 1
    public function getProducts(): ProductCollection
45
    {
46 1
        return $this->products;
47
    }
48
49 1
    public function getDiscounts(): DiscountCollection
50
    {
51 1
        return $this->discounts;
52
    }
53
54 1
    public function getDeletedProducts(): ProductCollection
55
    {
56 1
        return $this->deletedProducts;
57
    }
58
59 1
    public function getDeletedDiscounts(): DiscountCollection
60
    {
61 1
        return $this->deletedDiscounts;
62
    }
63
}
64