Passed
Push — main ( 6bf038...55787e )
by Aleksandr
08:10
created

IntervalsRequest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 26
ccs 7
cts 7
cp 1
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getService() 0 3 1
A getZone() 0 3 1
A __construct() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace DalliSDK\Requests;
6
7
use DalliSDK\Responses\IntervalsResponse;
8
use JMS\Serializer\Annotation as JMS;
9
10
/**
11
 * Запрос интервалов доставки
12
 *
13
 * @see https://api.dalli-service.com/v1/doc/intervals
14
 * @JMS\XmlRoot("intervals")
15
 */
16
class IntervalsRequest extends AbstractRequest implements RequestInterface
17
{
18
    public const RESPONSE_CLASS = IntervalsResponse::class;
19
    private ?int $zone;
20
    private ?int $service;
21
22 1
    public function __construct(?int $zone = null, ?int $service = null)
23
    {
24 1
        $this->service = $service;
25 1
        $this->zone = $zone;
26
    }
27
28
    /**
29
     * @return int|null
30
     */
31 1
    public function getZone(): ?int
32
    {
33 1
        return $this->zone;
34
    }
35
36
    /**
37
     * @return int|null
38
     */
39 1
    public function getService(): ?int
40
    {
41 1
        return $this->service;
42
    }
43
}
44