Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
17 | 7 | public function inflect($command, $commandHandler) |
|
18 | { |
||
19 | 7 | $commandName = get_class($command); |
|
20 | |||
21 | // If class name has a namespace separator, only take last portion |
||
22 | 7 | if (strpos($commandName, '\\') !== false) { |
|
23 | 3 | $commandName = substr($commandName, strrpos($commandName, '\\') + 1); |
|
24 | } |
||
25 | |||
26 | 7 | return strtolower($commandName[0]) . substr($commandName, 1); |
|
27 | } |
||
28 | } |
||
29 |