Completed
Push — master ( 4317fb...cd535a )
by Vladimir
02:31
created

Intent::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace FondBot\Conversation;
6
7
use FondBot\Bot;
8
use FondBot\Traits\Loggable;
9
use FondBot\Conversation\Traits\Transitions;
10
use FondBot\Conversation\Traits\Authorization;
11
use FondBot\Conversation\Traits\HasActivators;
12
use FondBot\Contracts\Conversation\Conversable;
13
use FondBot\Conversation\Traits\InteractsWithContext;
14
use FondBot\Contracts\Conversation\Intent as IntentContract;
15
16
abstract class Intent implements IntentContract, Conversable
17
{
18
    use Authorization, InteractsWithContext, HasActivators, Transitions, Loggable;
19
20
    /**
21
     * Handle intent.
22
     *
23
     * @param Bot $bot
24
     */
25
    final public function handle(Bot $bot): void
26
    {
27
        $this->debug('handle');
28
        $this->bot = $bot;
29
        $this->process();
30
    }
31
}
32