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.

Profile::screenName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php declare(strict_types=1);
2
3
namespace ApiClients\Client\Twitter\Resource;
4
5
use ApiClients\Foundation\Hydrator\Annotation\EmptyResource;
6
use ApiClients\Foundation\Resource\AbstractResource;
7
8
/**
9
 * @EmptyResource("EmptyProfile")
10
 */
11
abstract class Profile extends AbstractResource implements ProfileInterface
12
{
13
    /**
14
     * @var int
15
     */
16
    protected $id;
17
18
    /**
19
     * @var string
20
     */
21
    protected $id_str;
22
23
    /**
24
     * @var string
25
     */
26
    protected $name;
27
28
    /**
29
     * @var string
30
     */
31
    protected $screen_name;
32
33
    /**
34
     * @var string
35
     */
36
    protected $location;
37
38
    /**
39
     * @var string
40
     */
41
    protected $profile_location;
42
43
    /**
44
     * @var string
45
     */
46
    protected $description;
47
48
    /**
49
     * @var string
50
     */
51
    protected $url;
52
53
    /**
54
     * @var array
55
     */
56
    protected $changedFields = [];
57
58
    /**
59
     * @return int
60
     */
61 4
    public function id(): int
62
    {
63 4
        return $this->id;
64
    }
65
66
    /**
67
     * @return string
68
     */
69 4
    public function idStr(): string
70
    {
71 4
        return $this->id_str;
72
    }
73
74
    /**
75
     * @return string
76
     */
77 4
    public function name(): string
78
    {
79 4
        return $this->name;
80
    }
81
82
    /**
83
     * @return string
84
     */
85 4
    public function screenName(): string
86
    {
87 4
        return $this->screen_name;
88
    }
89
90
    /**
91
     * @return string
92
     */
93 4
    public function location(): string
94
    {
95 4
        return $this->location;
96
    }
97
98
    /**
99
     * @return string
100
     */
101 4
    public function profileLocation(): string
102
    {
103 4
        return $this->profile_location;
104
    }
105
106
    /**
107
     * @return string
108
     */
109 4
    public function description(): string
110
    {
111 4
        return $this->description;
112
    }
113
114
    /**
115
     * @return string
116
     */
117 4
    public function url(): string
118
    {
119 4
        return $this->url;
120
    }
121
122
    /**
123
     * @param  string           $name
124
     * @return ProfileInterface
125
     */
126 View Code Duplication
    public function withName(string $name): ProfileInterface
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
127
    {
128
        $clone = clone $this;
129
        $clone->name = $name;
130
        $clone->changedFields['name'] = 'name';
131
132
        return $clone;
133
    }
134
135
    /**
136
     * @param  string           $location
137
     * @return ProfileInterface
138
     */
139 View Code Duplication
    public function withLocation(string $location): ProfileInterface
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
140
    {
141
        $clone = clone $this;
142
        $clone->location = $location;
143
        $clone->changedFields['location'] = 'location';
144
145
        return $clone;
146
    }
147
148
    /**
149
     * @param  string           $description
150
     * @return ProfileInterface
151
     */
152 View Code Duplication
    public function withDescription(string $description): ProfileInterface
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
153
    {
154
        $clone = clone $this;
155
        $clone->description = $description;
156
        $clone->changedFields['description'] = 'description';
157
158
        return $clone;
159
    }
160
161
    /**
162
     * @param  string           $url
163
     * @return ProfileInterface
164
     */
165 View Code Duplication
    public function withUrl(string $url): ProfileInterface
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
166
    {
167
        $clone = clone $this;
168
        $clone->url = $url;
169
        $clone->changedFields['url'] = 'url';
170
171
        return $clone;
172
    }
173
174
    public function putProfile()
175
    {
176
    }
177
}
178