Completed
Push — master ( 2bd91c...7c9f66 )
by Irfaq
02:27
created

UpdateWasReceived::getTelegram()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Telegram\Bot\Events;
4
5
use League\Event\AbstractEvent;
6
use Telegram\Bot\Api;
7
use Telegram\Bot\Objects\Update;
8
9
class UpdateWasReceived extends AbstractEvent
10
{
11
    /**
12
     * @var Update
13
     */
14
    private $update;
15
16
    /**
17
     * @var Api
18
     */
19
    private $telegram;
20
21
    /**
22
     * UpdateWasReceived constructor.
23
     *
24
     * @param Update $update
25
     * @param Api    $telegram
26
     */
27 6
    public function __construct(Update $update, Api $telegram)
28
    {
29 6
        $this->update = $update;
30 6
        $this->telegram = $telegram;
31 6
    }
32
33
    /**
34
     * @return Update
35
     */
36
    public function getUpdate()
37
    {
38
        return $this->update;
39
    }
40
41
    /**
42
     * @return Api
43
     */
44
    public function getTelegram()
45
    {
46
        return $this->telegram;
47
    }
48
}
49