Carrier   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 206
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 39
dl 0
loc 206
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getAll() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Inspirum\Balikobot\Definitions;
6
7
use function array_filter;
8
use function array_values;
9
use function in_array;
10
11
final class Carrier extends BaseEnum
12
{
13
    /**
14
     * Česká pošta
15
     */
16
    public const CP = 'cp';
17
18
    /**
19
     * DPD
20
     */
21
    public const DPD = 'dpd';
22
23
    /**
24
     * DHL Express
25
     */
26
    public const DHL = 'dhl';
27
28
    /**
29
     * Geis Cargo - paletová přeprava
30
     */
31
    public const GEIS = 'geis';
32
33
    /**
34
     * GLS
35
     */
36
    public const GLS = 'gls';
37
38
    /**
39
     * WE DO
40
     */
41
    public const INTIME = 'intime';
42
43
    /**
44
     * Pošta bez hranic
45
     */
46
    public const PBH = 'pbh';
47
48
    /**
49
     * PPL + DHL Freight
50
     */
51
    public const PPL = 'ppl';
52
53
    /**
54
     * Slovenská pošta
55
     */
56
    public const SP = 'sp';
57
58
    /**
59
     * Slovak Parcel Service
60
     */
61
    public const SPS = 'sps';
62
63
    /**
64
     * Toptrans
65
     */
66
    public const TOPTRANS = 'toptrans';
67
68
    /**
69
     * WE DO - Uloženka
70
     *
71
     * @deprecated Replaced by One by Allegro
72
     *
73
     * @see self::ONEBYALLEGRO
74
     */
75
    public const ULOZENKA = 'ulozenka';
76
77
    /**
78
     * UPS
79
     */
80
    public const UPS = 'ups';
81
82
    /**
83
     * Zásilkovna
84
     */
85
    public const ZASILKOVNA = 'zasilkovna';
86
87
    /**
88
     * TNT
89
     */
90
    public const TNT = 'tnt';
91
92
    /**
93
     * Gebrüder Weiss Slovensko
94
     */
95
    public const GW = 'gw';
96
97
    /**
98
     * Gebrüder Weiss Česká republika
99
     */
100
    public const GWCZ = 'gwcz';
101
102
    /**
103
     * Messenger
104
     */
105
    public const MESSENGER = 'messenger';
106
107
    /**
108
     * DHL DE
109
     */
110
    public const DHLDE = 'dhlde';
111
112
    /**
113
     * FedEx
114
     */
115
    public const FEDEX = 'fedex';
116
117
    /**
118
     * Fofr
119
     */
120
    public const FOFR = 'fofr';
121
122
    /**
123
     * Dachser
124
     */
125
    public const DACHSER = 'dachser';
126
127
    /**
128
     * DHL Parcel Europe - PPL Parcel Connect EU
129
     */
130
    public const DHLPARCEL = 'dhlparcel';
131
132
    /**
133
     * Raben
134
     */
135
    public const RABEN = 'raben';
136
137
    /**
138
     * Spring
139
     */
140
    public const SPRING = 'spring';
141
142
    /**
143
     * Spring
144
     */
145
    public const DSV = 'dsv';
146
147
    /**
148
     * DHL Freight Euroconnect
149
     */
150
    public const DHLFREIGHTEC = 'dhlfreightec';
151
152
    /**
153
     * 123kurier
154
     *
155
     * @deprecated Terminated
156
     */
157
    public const KURIER = 'kurier';
158
159
    /**
160
     * DB Schenker
161
     */
162
    public const DBSCHENKER = 'dbschenker';
163
164
    /**
165
     * AIRWAY
166
     */
167
    public const AIRWAY = 'airway';
168
169
    /**
170
     * JAPO Transport
171
     */
172
    public const JAPO = 'japo';
173
174
    /**
175
     * Liftago
176
     */
177
    public const LIFTAGO = 'liftago';
178
179
    /**
180
     * Magyar posta
181
     */
182
    public const MAGYARPOSTA = 'magyarposta';
183
184
    /**
185
     * Sameday
186
     */
187
    public const SAMEDAY = 'sameday';
188
189
    /**
190
     * Sameday
191
     */
192
    public const SDS = 'sds';
193
194
    /**
195
     * Quality Delivery Logistics
196
     *
197
     * @deprecated Terminated
198
     */
199
    public const QDL = 'qdl';
200
201
    /**
202
     * Inpost
203
     */
204
    public const INPOST = 'inpost';
205
206
    /**
207
     * One by Allegro
208
     */
209
    public const ONEBYALLEGRO = 'onebyallegro';
210
211
    /**
212
     * @return list<string>
0 ignored issues
show
Bug introduced by
The type Inspirum\Balikobot\Definitions\list was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
213
     */
214
    public static function getAll(): array
215
    {
216
        return array_values(array_filter(parent::getAll(), static fn (string $value): bool => !in_array($value, [self::ULOZENKA])));
0 ignored issues
show
Bug Best Practice introduced by
The expression return array_values(arra...on(...) { /* ... */ })) returns the type array which is incompatible with the documented return type Inspirum\Balikobot\Definitions\list.
Loading history...
Deprecated Code introduced by
The constant Inspirum\Balikobot\Definitions\Carrier::ULOZENKA has been deprecated: Replaced by One by Allegro ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

216
        return array_values(array_filter(parent::getAll(), static fn (string $value): bool => !in_array($value, [/** @scrutinizer ignore-deprecated */ self::ULOZENKA])));

This class constant has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the constant will be removed from the class and what other constant to use instead.

Loading history...
217
    }
218
}
219