Total Complexity | 9 |
Total Lines | 63 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | trait OptionsSeatProperty |
||
6 | { |
||
7 | protected $OptionsSeat; |
||
8 | |||
9 | |||
10 | /** |
||
11 | * @param string||array $OptionsSeat |
||
|
|||
12 | * Параметр груза для каждого места отправления |
||
13 | * Перебираем значение массива и вказываем нужные объемы |
||
14 | * Если не указывать значение из конфига в 1 кг |
||
15 | * @see https://devcenter.novaposhta.ua/docs/services/556eef34a0fe4f02049c664e/operations/57484280a0fe4f33f0d4dd77 |
||
16 | * @return this |
||
17 | */ |
||
18 | public function setOptionsSeat($OptionsSeat) |
||
33 | } |
||
34 | |||
35 | public function getOptionsSeat() |
||
36 | { |
||
37 | if (! $this->OptionsSeat) { |
||
38 | $this->OptionsSeat[] = config('novaposhta.options_seat')[10]; |
||
39 | } |
||
40 | $this->methodProperties['OptionsSeat'] = $this->OptionsSeat; |
||
1 ignored issue
–
show
|
|||
41 | |||
42 | return $this; |
||
43 | } |
||
44 | |||
45 | |||
46 | /** |
||
47 | * @param string $Weight |
||
48 | * Устанавливаем вес груза. По умолчанию значение из конфига |
||
49 | * nit:Daan |
||
50 | * Не обязательно, если выставляем OptionsSeat, но пока оставлю тут |
||
51 | * @return this |
||
52 | */ |
||
53 | public function setWeight($Weight) |
||
54 | { |
||
55 | $this->Weight = $Weight; |
||
56 | |||
57 | return $this; |
||
58 | } |
||
59 | |||
60 | public function getWeight() |
||
68 | } |
||
69 | |||
70 | } |
||
71 |