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
Pull Request — master (#4)
by Cees-Jan
02:28
created

Profile   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 104
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 77.78%

Importance

Changes 0
Metric Value
wmc 8
lcom 1
cbo 1
dl 0
loc 104
ccs 14
cts 18
cp 0.7778
rs 10
c 0
b 0
f 0

8 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 withName() 0 6 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
     * @return int
50
     */
51 4
    public function id() : int
52
    {
53 4
        return $this->id;
54
    }
55
56
    /**
57
     * @return string
58
     */
59 4
    public function idStr() : string
60
    {
61 4
        return $this->id_str;
62
    }
63
64
    /**
65
     * @return string
66
     */
67 4
    public function name() : string
68
    {
69 4
        return $this->name;
70
    }
71
72
    /**
73
     * @return string
74
     */
75 4
    public function screenName() : string
76
    {
77 4
        return $this->screen_name;
78
    }
79
80
    /**
81
     * @return string
82
     */
83 4
    public function location() : string
84
    {
85 4
        return $this->location;
86
    }
87
88
    /**
89
     * @return string
90
     */
91 4
    public function profileLocation() : string
92
    {
93 4
        return $this->profile_location;
94
    }
95
96
    /**
97
     * @return string
98
     */
99 4
    public function description() : string
100
    {
101 4
        return $this->description;
102
    }
103
104
    /**
105
     * @param string $name
106
     * @return ProfileInterface
107
     */
108
    public function withName(string $name): ProfileInterface
109
    {
110
        $clone = clone $this;
111
        $clone->name = $name;
112
        return $clone;
113
    }
114
}
115