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.

FileUploadCommand::getStream()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 2
cts 2
cp 1
cc 1
nc 1
nop 0
crap 1
1
<?php declare(strict_types=1);
2
3
namespace ApiClients\Client\Github\CommandBus\Command\Repository\Contents;
4
5
use React\Stream\ReadableStreamInterface;
6
use WyriHaximus\Tactician\CommandHandler\Annotations\Handler;
7
8
/**
9
 * @Handler("ApiClients\Client\Github\CommandBus\Handler\Repository\Contents\FileUploadHandler")
10
 */
11
final class FileUploadCommand
12
{
13
    /**
14
     * @var string
15
     */
16
    private $repository;
17
18
    /**
19
     * @var string
20
     */
21
    private $commitMessage;
22
23
    /**
24
     * @var string
25
     */
26
    private $url;
27
28
    /**
29
     * @var string
30
     */
31
    private $sha;
32
33
    /**
34
     * @var string
35
     */
36
    private $branch;
37
38
    /**
39
     * @var ReadableStreamInterface
40
     */
41
    private $stream;
42
43
    /**
44
     * @param string                  $repository
45
     * @param string                  $commitMessage
46
     * @param string                  $url
47
     * @param string                  $sha
48
     * @param string                  $branch
49
     * @param ReadableStreamInterface $stream
50
     */
51 3 View Code Duplication
    public function __construct(
0 ignored issues
show
Duplication introduced by
This method 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...
52
        string $repository,
53
        string $commitMessage,
54
        string $url,
55
        string $sha,
56
        string $branch,
57
        ReadableStreamInterface $stream
58
    ) {
59 3
        $this->repository = $repository;
60 3
        $this->commitMessage = $commitMessage;
61 3
        $this->url = $url;
62 3
        $this->sha = $sha;
63 3
        $this->branch = $branch;
64 3
        $this->stream = $stream;
65 3
    }
66
67
    /**
68
     * @return string
69
     */
70
    public function getRepository(): string
71
    {
72
        return $this->repository;
73
    }
74
75
    /**
76
     * @return string
77
     */
78 3
    public function getCommitMessage(): string
79
    {
80 3
        return $this->commitMessage;
81
    }
82
83
    /**
84
     * @return string
85
     */
86 3
    public function getUrl(): string
87
    {
88 3
        return $this->url;
89
    }
90
91
    /**
92
     * @return string
93
     */
94 3
    public function getSha(): string
95
    {
96 3
        return $this->sha;
97
    }
98
99
    /**
100
     * @return string
101
     */
102 3
    public function getBranch(): string
103
    {
104 3
        return $this->branch;
105
    }
106
107
    /**
108
     * @return ReadableStreamInterface
109
     */
110 3
    public function getStream(): ReadableStreamInterface
111
    {
112 3
        return $this->stream;
113
    }
114
}
115