Passed
Push — develop ( c6dbeb...6fc924 )
by Septianata
02:55
created

CoegController   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 37
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A handle() 0 3 1
A startConversation() 0 3 1
1
<?php
2
3
namespace App\Http\Controllers;
4
5
use App\Conversations\ExampleConversation;
6
use BotMan\BotMan\BotMan;
7
use BotMan\BotMan\Facades\BotMan as BotManFacade;
8
9
class CoegController extends Controller
10
{
11
    /**
12
     * The BotMan instance.
13
     *
14
     * @var \BotMan\BotMan\BotMan
15
     */
16
    protected BotMan $botman;
17
18
    /**
19
     * Create a new instance class.
20
     *
21
     * @return void
22
     */
23
    public function __construct()
24
    {
25
        $this->botman = BotManFacade::getFacadeRoot();
26
    }
27
28
    /**
29
     * Place for BotMan logic.
30
     *
31
     * @return void
32
     */
33
    public function handle()
34
    {
35
        $this->botman->listen();
36
    }
37
38
    /**
39
     * Handle start conversation.
40
     *
41
     * @return void
42
     */
43
    public function startConversation()
44
    {
45
        $this->botman->startConversation(new ExampleConversation);
46
    }
47
}
48