UpdateWasReceived   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 50%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 40
ccs 4
cts 8
cp 0.5
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getUpdate() 0 4 1
A getTelegram() 0 4 1
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