Passed
Push — master ( 61fa52...b9d74d )
by Vladimir
13:13
created

FallbackIntent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 2
dl 0
loc 23
ccs 8
cts 8
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A activators() 0 4 1
A run() 0 10 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace FondBot\Conversation;
6
7
use FondBot\Conversation\Activators\Activator;
8
9
class FallbackIntent extends Intent
10
{
11
    /**
12
     * Intent activators.
13
     *
14
     * @return Activator[]
15
     */
16 1
    public function activators(): array
17
    {
18 1
        return [];
19
    }
20
21 1
    public function run(): void
22
    {
23 1
        $text = collect([
24 1
            'Sorry, I could not understand you.',
25
            'Oops, I can\'t do that 😔',
26
            'My developer did not teach to do that.',
27 1
        ])->random();
28
29 1
        $this->sendMessage($text);
30 1
    }
31
}
32