TrackRequest::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace VasilDakov\Speedy\Service\Track;
6
7
use VasilDakov\Speedy\Property;
8
use VasilDakov\Speedy\Speedy;
9
10
/**
11
 * Class TrackRequest.
12
 *
13
 * @author Vasil Dakov <[email protected]>
14
 * @copyright 2009-2022 Neutrino.bg
15
 *
16
 * @version 1.0
17
 */
18
class TrackRequest
19
{
20
    private array $parcels;
21
22 2
    public function __construct(array $parcels)
23
    {
24 2
        $this->parcels = $parcels;
25
    }
26
27 1
    public function getParcels(): array
28
    {
29 1
        return $this->parcels;
30
    }
31
32 1
    public function toArray(): array
33
    {
34 1
        return [
35 1
            Property::PARCELS->value => $this->parcels,
36 1
        ];
37
    }
38
}
39