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 (#1)
by Cees-Jan
03:29
created

Commit::author()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 0
cts 2
cp 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php declare(strict_types=1);
2
3
namespace ApiClients\Client\Github\Resource\Repository;
4
5
use ApiClients\Client\Github\Resource\Git\CommitInterface as GitCommitInterface;
6
use ApiClients\Client\Github\Resource\TreeInterface;
7
use ApiClients\Client\Github\Resource\UserInterface;
8
use ApiClients\Foundation\Hydrator\Annotations\Collection;
9
use ApiClients\Foundation\Hydrator\Annotations\EmptyResource;
10
use ApiClients\Foundation\Hydrator\Annotations\Nested;
11
use ApiClients\Foundation\Resource\AbstractResource;
12
13
/**
14
 * @Collection(
15
 *     parents="Tree"
16
 * )
17
 * @Nested(
18
 *     commit="Git\Commit",
19
 *     author="User",
20
 *     comitter="User"
21
 * )
22
 * @EmptyResource("Repository\EmptyCommit")
23
 */
24
abstract class Commit extends AbstractResource implements CommitInterface
25
{
26
    /**
27
     * @var string
28
     */
29
    protected $url;
30
31
    /**
32
     * @var string
33
     */
34
    protected $sha;
35
36
    /**
37
     * @var string
38
     */
39
    protected $html_url;
40
41
    /**
42
     * @var GitCommitInterface
43
     */
44
    protected $commit;
45
46
    /**
47
     * @var UserInterface
48
     */
49
    protected $author;
50
51
    /**
52
     * @var UserInterface
53
     */
54
    protected $comitter;
55
56
    /**
57
     * @var TreeInterface
58
     */
59
    protected $parents;
60
61
    /**
62
     * @return string
63
     */
64 4
    public function url() : string
65
    {
66 4
        return $this->url;
67
    }
68
69
    /**
70
     * @return string
71
     */
72 4
    public function sha() : string
73
    {
74 4
        return $this->sha;
75
    }
76
77
    /**
78
     * @return string
79
     */
80 4
    public function htmlUrl() : string
81
    {
82 4
        return $this->html_url;
83
    }
84
85
    /**
86
     * @return GitCommitInterface
87
     */
88
    public function commit() : GitCommitInterface
0 ignored issues
show
Coding Style Best Practice introduced by
Please use __construct() instead of a PHP4-style constructor that is named after the class.
Loading history...
89
    {
90
        return $this->commit;
91
    }
92
93
    /**
94
     * @return UserInterface
95
     */
96
    public function author() : UserInterface
97
    {
98
        return $this->author;
99
    }
100
101
    /**
102
     * @return UserInterface
103
     */
104
    public function comitter() : UserInterface
105
    {
106
        return $this->comitter;
107
    }
108
109
    /**
110
     * @return TreeInterface
111
     */
112
    public function parents() : TreeInterface
113
    {
114
        return $this->parents;
115
    }
116
}
117