| Total Complexity | 3 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | final class HandleClassNameWithoutSuffix implements MethodNameInflector |
||
| 23 | { |
||
| 24 | private string $suffix; |
||
| 25 | |||
| 26 | private int $suffixLength; |
||
| 27 | private HandleLastPartOfClassName $handleLastPartOfClassName; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param string $suffix The string to remove from end of each class name |
||
| 31 | */ |
||
| 32 | 3 | public function __construct(string $suffix = 'Command') |
|
| 33 | { |
||
| 34 | 3 | $this->suffix = $suffix; |
|
| 35 | 3 | $this->suffixLength = strlen($suffix); |
|
| 36 | 3 | $this->handleLastPartOfClassName = new HandleLastPartOfClassName(); |
|
| 37 | 3 | } |
|
| 38 | |||
| 39 | 3 | public function getMethodName(string $commandClassName): string |
|
| 48 | } |
||
| 49 | } |
||
| 50 |