RepeaterBot   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 5
Bugs 1 Features 0
Metric Value
wmc 1
c 5
b 1
f 0
lcom 0
cbo 1
dl 0
loc 14
ccs 3
cts 3
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A execute() 0 6 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