WarehousesFilter::filterBicycleParking()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 4
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 4
b 0
f 0
nc 1
nop 0
dl 0
loc 5
rs 10
1
<?php
2
3
namespace Daaner\NovaPoshta\Traits;
4
5
trait WarehousesFilter
6
{
7
    protected $typeOfWarehouseRef;
8
9
    /**
10
     * Наличие парковки для велосипедов.
11
     *
12
     * @return $this
13
     */
14
    public function filterBicycleParking(): self
15
    {
16
        $this->methodProperties['BicycleParking'] = 1;
17
18
        return $this;
19
    }
20
21
    /**
22
     * Наличие PostFinance.
23
     *
24
     * @return $this
25
     */
26
    public function filterPostFinance(): self
27
    {
28
        $this->methodProperties['PostFinance'] = 1;
29
30
        return $this;
31
    }
32
33
    /**
34
     * Фильтр по типу отделения.
35
     *
36
     * @param  string  $typeOfWarehouseRef  Ref типа отделения
37
     * @return $this
38
     */
39
    public function setTypeOfWarehouseRef(string $typeOfWarehouseRef): self
40
    {
41
        $this->typeOfWarehouseRef = $typeOfWarehouseRef;
42
43
        return $this;
44
    }
45
46
    /**
47
     * @return void
48
     */
49
    public function getTypeOfWarehouseRef(): void
50
    {
51
        if ($this->typeOfWarehouseRef) {
52
            $this->methodProperties['TypeOfWarehouseRef'] = $this->typeOfWarehouseRef;
53
        }
54
    }
55
}
56