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 ( 8f129d...f20c64 )
by Cees-Jan
06:04
created

Commit::comitter()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 4
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php declare(strict_types=1);
2
3
namespace ApiClients\Client\Github\Resource\Git;
4
5
use ApiClients\Client\Github\Resource\TreeInterface;
6
use ApiClients\Foundation\Hydrator\Annotation\EmptyResource;
7
use ApiClients\Foundation\Hydrator\Annotation\Nested;
8
use ApiClients\Foundation\Resource\AbstractResource;
9
10
/**
11
 * @Nested(
12
 *     author="User",
13
 *     comitter="User",
14
 *     tree="Tree"
15
 * )
16
 * @EmptyResource("Git\EmptyCommit")
17
 */
18 View Code Duplication
abstract class Commit extends AbstractResource implements CommitInterface
0 ignored issues
show
Duplication introduced by
This class 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...
19
{
20
    /**
21
     * @var string
22
     */
23
    protected $sha;
24
25
    /**
26
     * @var string
27
     */
28
    protected $url;
29
30
    /**
31
     * @var User
32
     */
33
    protected $author;
34
35
    /**
36
     * @var User
37
     */
38
    protected $comitter;
39
40
    /**
41
     * @var string
42
     */
43
    protected $message;
44
45
    /**
46
     * @var Tree
47
     */
48
    protected $tree;
49
50
    /**
51
     * @var int
52
     */
53
    protected $comment_count;
54
55
    /**
56
     * @var string
57
     */
58
    protected $protection_url;
59
60
    /**
61
     * @return string
62
     */
63 4
    public function sha(): string
64
    {
65 4
        return $this->sha;
66
    }
67
68
    /**
69
     * @return string
70
     */
71 4
    public function url(): string
72
    {
73 4
        return $this->url;
74
    }
75
76
    /**
77
     * @return User
78
     */
79
    public function author(): User
80
    {
81
        return $this->author;
82
    }
83
84
    /**
85
     * @return User
86
     */
87
    public function comitter(): User
88
    {
89
        return $this->comitter;
90
    }
91
92
    /**
93
     * @return string
94
     */
95 4
    public function message(): string
96
    {
97 4
        return $this->message;
98
    }
99
100
    /**
101
     * @return TreeInterface
102
     */
103
    public function tree(): TreeInterface
104
    {
105
        return $this->tree;
106
    }
107
108
    /**
109
     * @return int
110
     */
111 4
    public function commentCount(): int
112
    {
113 4
        return $this->comment_count;
114
    }
115
116
    /**
117
     * @return string
118
     */
119 4
    public function protectionUrl(): string
120
    {
121 4
        return $this->protection_url;
122
    }
123
}
124