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 ( 2d5dc2...c17ad1 )
by Cees-Jan
09:41
created

CommitCommand::getTree()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php declare(strict_types=1);
2
3
namespace ApiClients\Client\Github\CommandBus\Command\Repository;
4
5
use WyriHaximus\Tactician\CommandHandler\Annotations\Handler;
6
7
/**
8
 * @Handler("ApiClients\Client\Github\CommandBus\Handler\Repository\CommitHandler")
9
 */
10
final class CommitCommand
11
{
12
    /** @var string */
13
    private $repository;
14
15
    /** @var string */
16
    private $message;
17
18
    /** @var string */
19
    private $tree;
20
21
    /** @var string[]|null */
22
    private $commit;
23
24
    /**
25
     * @param string        $repository
26
     * @param string        $message
27
     * @param string        $tree
28
     * @param string[]|null $commit
29
     */
30
    public function __construct(string $repository, string $message, string $tree, ?string ...$commit)
31
    {
32
        $this->repository = $repository;
33
        $this->message = $message;
34
        $this->tree = $tree;
35
        $this->commit = $commit;
0 ignored issues
show
Documentation Bug introduced by
It seems like $commit of type array<integer,array<integer,string>|null> is incompatible with the declared type array<integer,string>|null of property $commit.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
36
    }
37
38
    /**
39
     * @return string
40
     */
41
    public function getRepository(): string
42
    {
43
        return $this->repository;
44
    }
45
46
    /**
47
     * @return string
48
     */
49
    public function getMessage(): string
50
    {
51
        return $this->message;
52
    }
53
54
    /**
55
     * @return string
56
     */
57
    public function getTree(): string
58
    {
59
        return $this->tree;
60
    }
61
62
    /**
63
     * @return string[]|null
64
     */
65
    public function getCommit(): ?array
66
    {
67
        return $this->commit;
68
    }
69
}
70