Conditions | 4 |
Paths | 4 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
47 | 6 | public function inflect($command, $commandHandler) |
|
48 | { |
||
49 | 6 | $commandName = get_class($command); |
|
50 | |||
51 | 6 | $start = strpos($commandName, '\\') !== false ? strrpos($commandName, '\\') + 1 : 0; |
|
52 | 6 | $length = strpos($commandName, $this->suffix, -$this->suffixLength) !== false ? $this->suffixLength : null; |
|
53 | |||
54 | 6 | return lcfirst($length ? substr($commandName, $start, -$length) : substr($commandName, $start)); |
|
55 | } |
||
57 |