Passed
Push — main ( c406f0...7e57b3 )
by Vasil
03:22
created

TrackResponse   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 5
c 0
b 0
f 0
dl 0
loc 20
ccs 6
cts 6
cp 1
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setParcels() 0 3 1
A __construct() 0 3 1
A getParcels() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace VasilDakov\Speedy\Service\Track;
6
7
use Doctrine\Common\Collections\ArrayCollection;
8
use JMS\Serializer\Annotation as Serializer;
9
10
/**
11
 * Class TrackResponse.
12
 *
13
 * @author Vasil Dakov <[email protected]>
14
 * @copyright 2009-2022 Neutrino.bg
15
 *
16
 * @version 1.0
17
 */
18
class TrackResponse
19
{
20
    /**
21
     * @Serializer\Type("ArrayCollection<VasilDakov\Speedy\Service\Track\TrackedParcel>")
22
     */
23
    private ArrayCollection $parcels;
24
25 2
    public function __construct()
26
    {
27 2
        $this->parcels = new ArrayCollection();
28
    }
29
30 1
    public function getParcels(): ArrayCollection
31
    {
32 1
        return $this->parcels;
33
    }
34
35 1
    public function setParcels(ArrayCollection $parcels): void
36
    {
37 1
        $this->parcels = $parcels;
38
    }
39
}
40