Completed
Push — master ( 59b9fb...b4679f )
by Vladimir
02:55
created

SendRequest::getRecipient()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace FondBot\Drivers\Commands;
6
7
use FondBot\Drivers\Chat;
8
use FondBot\Drivers\User;
9
use FondBot\Drivers\Command;
10
11
class SendRequest implements Command
12
{
13
    private $chat;
14
    private $recipient;
15
    private $endpoint;
16
    private $parameters;
17
18 2
    public function __construct(Chat $chat, User $recipient, string $endpoint, array $parameters = [])
19
    {
20 2
        $this->chat = $chat;
21 2
        $this->recipient = $recipient;
22 2
        $this->endpoint = $endpoint;
23 2
        $this->parameters = $parameters;
24 2
    }
25
26
    /**
27
     * Get name.
28
     *
29
     * @return string
30
     */
31 1
    public function getName(): string
32
    {
33 1
        return 'SendRequest';
34
    }
35
36 1
    public function getChat(): Chat
37
    {
38 1
        return $this->chat;
39
    }
40
41 1
    public function getRecipient(): User
42
    {
43 1
        return $this->recipient;
44
    }
45
46 1
    public function getEndpoint(): string
47
    {
48 1
        return $this->endpoint;
49
    }
50
51 1
    public function getParameters(): array
52
    {
53 1
        return $this->parameters;
54
    }
55
}
56