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

FallbackIntent::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 10
ccs 6
cts 6
cp 1
rs 9.4285
cc 1
eloc 7
nc 1
nop 0
crap 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