CalculationService   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
dl 0
loc 32
ccs 11
cts 11
cp 1
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\Traits\ToArray;
8
9
/**
10
 * Class CalculationService.
11
 *
12
 * @author Vasil Dakov <[email protected]>
13
 * @copyright 2009-2022 Neutrino.bg
14
 *
15
 * @version 1.0
16
 */
17
class CalculationService
18
{
19
    use ToArray;
0 ignored issues
show
Bug introduced by
The trait VasilDakov\Speedy\Traits\ToArray requires the property $value which is not provided by VasilDakov\Speedy\Servic...tion\CalculationService.
Loading history...
20
21
    private bool $autoAdjustPickupDate = true;
22
23
    private array $serviceIds = [];
24
25 2
    public function __construct(bool $autoAdjustPickupDate, array $serviceIds)
26
    {
27 2
        $this->autoAdjustPickupDate = $autoAdjustPickupDate;
28 2
        $this->serviceIds = $serviceIds;
29
    }
30
31 1
    public function setAutoAdjustPickupDate(bool $autoAdjustPickupDate): void
32
    {
33 1
        $this->autoAdjustPickupDate = $autoAdjustPickupDate;
34
    }
35
36 1
    public function getAutoAdjustPickupDate(): bool
37
    {
38 1
        return $this->autoAdjustPickupDate;
39
    }
40
41 1
    public function setServiceIds(array $serviceIds): void
42
    {
43 1
        $this->serviceIds = $serviceIds;
44
    }
45
46 1
    public function getServiceIds(): array
47
    {
48 1
        return $this->serviceIds;
49
    }
50
}
51