Test Failed
Push — main ( 80b66f...88de3c )
by Vasil
03:26
created

CalculationService   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
dl 0
loc 44
rs 10
c 1
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setServiceIds() 0 3 1
A setAutoAdjustPickupDate() 0 3 1
A __construct() 0 4 1
A getServiceIds() 0 3 1
A getAutoAdjustPickupDate() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace VasilDakov\Speedy\Service\Calculation;
6
7
use VasilDakov\Speedy\ToArray;
8
9
/**
10
 * Class CalculationService
11
 *
12
 * @author Vasil Dakov <[email protected]>
13
 * @copyright 2009-2022 Neutrino.bg
14
 * @version 1.0
15
 */
16
class CalculationService
17
{
18
    use ToArray;
19
20
    private bool $autoAdjustPickupDate = true;
21
22
    private array $serviceIds = [];
23
24
    public function __construct(bool $autoAdjustPickupDate, array $serviceIds)
25
    {
26
        $this->autoAdjustPickupDate = $autoAdjustPickupDate;
27
        $this->serviceIds = $serviceIds;
28
    }
29
30
    /**
31
     * @param bool $autoAdjustPickupDate
32
     */
33
    public function setAutoAdjustPickupDate(bool $autoAdjustPickupDate): void
34
    {
35
        $this->autoAdjustPickupDate = $autoAdjustPickupDate;
36
    }
37
38
    /**
39
     * @return bool
40
     */
41
    public function getAutoAdjustPickupDate(): bool
42
    {
43
        return $this->autoAdjustPickupDate;
44
    }
45
46
    /**
47
     * @param array $serviceIds
48
     */
49
    public function setServiceIds(array $serviceIds): void
50
    {
51
        $this->serviceIds = $serviceIds;
52
    }
53
54
    /**
55
     * @return array
56
     */
57
    public function getServiceIds(): array
58
    {
59
        return $this->serviceIds;
60
    }
61
}
62