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

SendAttachment::getChat()   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
use FondBot\Templates\Attachment;
11
12
class SendAttachment implements Command
13
{
14
    private $chat;
15
    private $recipient;
16
    private $attachment;
17
18 3
    public function __construct(Chat $chat, User $recipient, Attachment $attachment)
19
    {
20 3
        $this->chat = $chat;
21 3
        $this->recipient = $recipient;
22 3
        $this->attachment = $attachment;
23 3
    }
24
25
    /**
26
     * Get name.
27
     *
28
     * @return string
29
     */
30 1
    public function getName(): string
31
    {
32 1
        return 'SendAttachment';
33
    }
34
35 1
    public function getChat(): Chat
36
    {
37 1
        return $this->chat;
38
    }
39
40 1
    public function getRecipient(): User
41
    {
42 1
        return $this->recipient;
43
    }
44
45 1
    public function getAttachment(): Attachment
46
    {
47 1
        return $this->attachment;
48
    }
49
}
50