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

CalculationService::setServiceIds()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
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