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 ( dd0aba...013e7d )
by Cees-Jan
12:23 queued 02:28
created

Commit::files()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
ccs 0
cts 0
cp 0
cc 1
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\Annotation\Collection;
9
use ApiClients\Foundation\Hydrator\Annotation\EmptyResource;
10
use ApiClients\Foundation\Hydrator\Annotation\Nested;
11
use ApiClients\Foundation\Resource\AbstractResource;
12
use Rx\Observable;
13
use function ApiClients\Tools\Rx\observableFromArray;
14
15
/**
16
 * @Collection(
17
 *     parents="Tree",
18
 *     files="Repository\Commit\File"
19
 * )
20
 * @Nested(
21
 *     commit="Git\Commit",
22
 *     author="User",
23
 *     comitter="User"
24
 * )
25
 * @EmptyResource("Repository\EmptyCommit")
26
 */
27
abstract class Commit extends AbstractResource implements CommitInterface
28
{
29
    /**
30
     * @var string
31
     */
32
    protected $url;
33
34
    /**
35
     * @var string
36
     */
37
    protected $sha;
38
39
    /**
40
     * @var string
41
     */
42
    protected $html_url;
43
44
    /**
45
     * @var GitCommitInterface
46
     */
47
    protected $commit;
48
49
    /**
50
     * @var UserInterface
51
     */
52
    protected $author;
53
54
    /**
55
     * @var UserInterface
56
     */
57
    protected $comitter;
58
59
    /**
60
     * @var TreeInterface
61
     */
62
    protected $parents;
63
64 4
    /**
65
     * @var Commit\File[]
66 4
     */
67
    protected $files;
68
69
    /**
70
     * @return string
71
     */
72 4
    public function url(): string
73
    {
74 4
        return $this->url;
75
    }
76
77
    /**
78
     * @return string
79
     */
80 4
    public function sha(): string
81
    {
82 4
        return $this->sha;
83
    }
84
85
    /**
86
     * @return string
87
     */
88
    public function htmlUrl(): string
89
    {
90
        return $this->html_url;
91
    }
92
93
    /**
94
     * @return GitCommitInterface
95
     */
96
    public function commit(): GitCommitInterface
97
    {
98
        return $this->commit;
99
    }
100
101
    /**
102
     * @return UserInterface
103
     */
104
    public function author(): UserInterface
105
    {
106
        return $this->author;
107
    }
108
109
    /**
110
     * @return UserInterface
111
     */
112
    public function comitter(): UserInterface
113
    {
114
        return $this->comitter;
115
    }
116
117
    /**
118
     * @return TreeInterface[]
119
     */
120
    public function parents(): array
121
    {
122
        return $this->parents;
123
    }
124
125
    /**
126
     * @return Commit\File[]
127
     */
128
    public function files(): array
129
    {
130
        return $this->files;
131
    }
132
}
133