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.
Completed
Push — master ( 61a149...5b9c21 )
by Cees-Jan
9s
created

Profile::name()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 2
cts 2
cp 1
cc 1
eloc 2
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\Annotations\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
        return $clone;
132
    }
133
134
    /**
135
     * @param string $location
136
     * @return ProfileInterface
137
     */
138 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...
139
    {
140
        $clone = clone $this;
141
        $clone->location = $location;
142
        $clone->changedFields['location'] = 'location';
143
        return $clone;
144
    }
145
146
    /**
147
     * @param string $description
148
     * @return ProfileInterface
149
     */
150 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...
151
    {
152
        $clone = clone $this;
153
        $clone->description = $description;
154
        $clone->changedFields['description'] = 'description';
155
        return $clone;
156
    }
157
158
    /**
159
     * @param string $url
160
     * @return ProfileInterface
161
     */
162 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...
163
    {
164
        $clone = clone $this;
165
        $clone->url = $url;
166
        $clone->changedFields['url'] = 'url';
167
        return $clone;
168
    }
169
170
    public function putProfile()
171
    {
172
    }
173
}
174