Completed
Push — develop ( 90d434...5a25e9 )
by Michael
02:38
created

RepeaterBot::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 4
Bugs 0 Features 0
Metric Value
c 4
b 0
f 0
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Crummy\Phlack\Bot;
4
5
use Crummy\Phlack\WebHook\CommandInterface;
6
7
class RepeaterBot extends AbstractBot
8
{
9
    /**
10
     * @param CommandInterface $command
11
     *
12
     * @return \Crummy\Phlack\WebHook\Reply\Reply
13
     */
14 4
    public function execute(CommandInterface $command)
15
    {
16 4
        $text = preg_replace(sprintf('/^%s /', $command['command']), '', $command['text']);
17
18 4
        return $this->reply($command, $text);
19
    }
20
}
21