GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

EmptyUser   B
last analyzed

Complexity

Total Complexity 43

Size/Duplication

Total Lines 346
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 43
lcom 0
cbo 0
dl 0
loc 346
ccs 86
cts 86
cp 1
rs 8.96
c 0
b 0
f 0

43 Methods

Rating   Name   Duplication   Size   Complexity  
A id() 0 4 1
A idStr() 0 4 1
A name() 0 4 1
A screenName() 0 4 1
A location() 0 4 1
A profileLocation() 0 4 1
A description() 0 4 1
A url() 0 4 1
A protected() 0 4 1
A followersCount() 0 4 1
A friendsCount() 0 4 1
A listedCount() 0 4 1
A createdAt() 0 4 1
A favouritesCount() 0 4 1
A utcOffset() 0 4 1
A timeZone() 0 4 1
A geoEnabled() 0 4 1
A verified() 0 4 1
A statusesCount() 0 4 1
A lang() 0 4 1
A status() 0 4 1
A contributorsEnabled() 0 4 1
A isTranslator() 0 4 1
A isTranslatorEnabled() 0 4 1
A profileBackgroundColor() 0 4 1
A profileBackgroundImageUrl() 0 4 1
A profileBackgroundImageUrlHttps() 0 4 1
A profileBackgroundTile() 0 4 1
A profileImageUrl() 0 4 1
A profileImageUrlHttps() 0 4 1
A profileBannerUrl() 0 4 1
A profileLinkColor() 0 4 1
A profileSidebarBorderColor() 0 4 1
A profileSidebarFillColor() 0 4 1
A profileTextColor() 0 4 1
A profileUseBackgroundImage() 0 4 1
A hasExtendedProfile() 0 4 1
A defaultProfile() 0 4 1
A defaultProfileImage() 0 4 1
A following() 0 4 1
A followRequestSent() 0 4 1
A notifications() 0 4 1
A translatorType() 0 4 1

How to fix   Complexity   

Complex Class

Complex classes like EmptyUser often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.

Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.

While breaking up the class, it is a good idea to analyze how other classes use EmptyUser, and based on these observations, apply Extract Interface, too.

1
<?php declare(strict_types=1);
2
3
namespace ApiClients\Client\Twitter\Resource;
4
5
use ApiClients\Foundation\Resource\EmptyResourceInterface;
6
use DateTime;
7
8
abstract class EmptyUser implements UserInterface, EmptyResourceInterface
9
{
10
    /**
11
     * @return int
12
     */
13 2
    public function id(): int
14
    {
15 2
        return null;
16
    }
17
18
    /**
19
     * @return string
20
     */
21 2
    public function idStr(): string
22
    {
23 2
        return null;
24
    }
25
26
    /**
27
     * @return string
28
     */
29 2
    public function name(): string
30
    {
31 2
        return null;
32
    }
33
34
    /**
35
     * @return string
36
     */
37 2
    public function screenName(): string
38
    {
39 2
        return null;
40
    }
41
42
    /**
43
     * @return string
44
     */
45 2
    public function location(): string
46
    {
47 2
        return null;
48
    }
49
50
    /**
51
     * @return string
52
     */
53 2
    public function profileLocation(): string
54
    {
55 2
        return null;
56
    }
57
58
    /**
59
     * @return string
60
     */
61 2
    public function description(): string
62
    {
63 2
        return null;
64
    }
65
66
    /**
67
     * @return string
68
     */
69 2
    public function url(): string
70
    {
71 2
        return null;
72
    }
73
74
    /**
75
     * @return bool
76
     */
77 2
    public function protected(): bool
78
    {
79 2
        return null;
80
    }
81
82
    /**
83
     * @return int
84
     */
85 2
    public function followersCount(): int
86
    {
87 2
        return null;
88
    }
89
90
    /**
91
     * @return int
92
     */
93 2
    public function friendsCount(): int
94
    {
95 2
        return null;
96
    }
97
98
    /**
99
     * @return int
100
     */
101 2
    public function listedCount(): int
102
    {
103 2
        return null;
104
    }
105
106
    /**
107
     * @return DateTime
108
     */
109 2
    public function createdAt(): DateTime
110
    {
111 2
        return null;
112
    }
113
114
    /**
115
     * @return int
116
     */
117 2
    public function favouritesCount(): int
118
    {
119 2
        return null;
120
    }
121
122
    /**
123
     * @return int
124
     */
125 2
    public function utcOffset(): int
126
    {
127 2
        return null;
128
    }
129
130
    /**
131
     * @return string
132
     */
133 2
    public function timeZone(): string
134
    {
135 2
        return null;
136
    }
137
138
    /**
139
     * @return bool
140
     */
141 2
    public function geoEnabled(): bool
142
    {
143 2
        return null;
144
    }
145
146
    /**
147
     * @return bool
148
     */
149 2
    public function verified(): bool
150
    {
151 2
        return null;
152
    }
153
154
    /**
155
     * @return int
156
     */
157 2
    public function statusesCount(): int
158
    {
159 2
        return null;
160
    }
161
162
    /**
163
     * @return string
164
     */
165 2
    public function lang(): string
166
    {
167 2
        return null;
168
    }
169
170
    /**
171
     * @return array
172
     */
173 2
    public function status(): array
174
    {
175 2
        return null;
176
    }
177
178
    /**
179
     * @return bool
180
     */
181 2
    public function contributorsEnabled(): bool
182
    {
183 2
        return null;
184
    }
185
186
    /**
187
     * @return bool
188
     */
189 2
    public function isTranslator(): bool
190
    {
191 2
        return null;
192
    }
193
194
    /**
195
     * @return bool
196
     */
197 2
    public function isTranslatorEnabled(): bool
198
    {
199 2
        return null;
200
    }
201
202
    /**
203
     * @return string
204
     */
205 2
    public function profileBackgroundColor(): string
206
    {
207 2
        return null;
208
    }
209
210
    /**
211
     * @return string
212
     */
213 2
    public function profileBackgroundImageUrl(): string
214
    {
215 2
        return null;
216
    }
217
218
    /**
219
     * @return string
220
     */
221 2
    public function profileBackgroundImageUrlHttps(): string
222
    {
223 2
        return null;
224
    }
225
226
    /**
227
     * @return bool
228
     */
229 2
    public function profileBackgroundTile(): bool
230
    {
231 2
        return null;
232
    }
233
234
    /**
235
     * @return string
236
     */
237 2
    public function profileImageUrl(): string
238
    {
239 2
        return null;
240
    }
241
242
    /**
243
     * @return string
244
     */
245 2
    public function profileImageUrlHttps(): string
246
    {
247 2
        return null;
248
    }
249
250
    /**
251
     * @return string
252
     */
253 2
    public function profileBannerUrl(): string
254
    {
255 2
        return null;
256
    }
257
258
    /**
259
     * @return string
260
     */
261 2
    public function profileLinkColor(): string
262
    {
263 2
        return null;
264
    }
265
266
    /**
267
     * @return string
268
     */
269 2
    public function profileSidebarBorderColor(): string
270
    {
271 2
        return null;
272
    }
273
274
    /**
275
     * @return string
276
     */
277 2
    public function profileSidebarFillColor(): string
278
    {
279 2
        return null;
280
    }
281
282
    /**
283
     * @return string
284
     */
285 2
    public function profileTextColor(): string
286
    {
287 2
        return null;
288
    }
289
290
    /**
291
     * @return bool
292
     */
293 2
    public function profileUseBackgroundImage(): bool
294
    {
295 2
        return null;
296
    }
297
298
    /**
299
     * @return bool
300
     */
301 2
    public function hasExtendedProfile(): bool
302
    {
303 2
        return null;
304
    }
305
306
    /**
307
     * @return bool
308
     */
309 2
    public function defaultProfile(): bool
310
    {
311 2
        return null;
312
    }
313
314
    /**
315
     * @return bool
316
     */
317 2
    public function defaultProfileImage(): bool
318
    {
319 2
        return null;
320
    }
321
322
    /**
323
     * @return bool
324
     */
325 2
    public function following(): bool
326
    {
327 2
        return null;
328
    }
329
330
    /**
331
     * @return bool
332
     */
333 2
    public function followRequestSent(): bool
334
    {
335 2
        return null;
336
    }
337
338
    /**
339
     * @return bool
340
     */
341 2
    public function notifications(): bool
342
    {
343 2
        return null;
344
    }
345
346
    /**
347
     * @return string
348
     */
349 2
    public function translatorType(): string
350
    {
351 2
        return null;
352
    }
353
}
354