Passed
Push — develop ( 209048...cb8559 )
by Septianata
02:54
created

BotmanController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
dl 0
loc 21
ccs 0
cts 5
cp 0
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A startConversation() 0 3 1
A __construct() 0 4 1
1
<?php
2
3
namespace App\Http\Controllers;
4
5
use App\Conversations\ExampleConversation;
6
use BotMan\BotMan\BotMan;
7
8
class BotmanController extends Controller
9
{
10
    /**
11
     * Create a new instance class.
12
     *
13
     * @return void
14
     */
15
    public function __construct(
16
        protected BotMan $botman
17
    ) {
18
        $this->botman = $botman;
19
    }
20
21
    /**
22
     * Handle start conversation.
23
     *
24
     * @return void
25
     */
26
    public function startConversation()
27
    {
28
        $this->botman->startConversation(new ExampleConversation);
29
    }
30
}
31