Completed
Pull Request — master (#171)
by
unknown
02:33
created

Conversation::make()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 7
ccs 0
cts 4
cp 0
rs 9.4285
cc 1
eloc 4
nc 1
nop 2
crap 2
1
<?php
2
3
namespace Telegram\Bot\Conversations;
4
5
use Telegram\Bot\Answers\Answerable;
6
use Telegram\Bot\Api;
7
use Telegram\Bot\Objects\Update;
8
9
/**
10
 * Class Conversation
11
 */
12
abstract class Conversation implements ConversationInterface
13
{
14
    use Answerable;
15
16
    /**
17
     * @inheritdoc
18
     */
19
    public function make(Api $telegram, Update $update)
20
    {
21
        $this->telegram = $telegram;
22
        $this->update = $update;
23
24
        return $this->handle();
25
    }
26
27
    /**
28
     * @inheritdoc
29
     */
30
    abstract public function handle();
31
}
32