Deprecated camelCase options in some CLI commands

This commit is contained in:
Alejandro Celaya
2021-01-30 10:54:04 +01:00
parent 28afb8944f
commit 96d07c4b4e
5 changed files with 101 additions and 36 deletions

View File

@@ -12,9 +12,12 @@ use PUGX\Shortid\Factory as ShortIdFactory;
use function Functional\reduce_left;
use function is_array;
use function lcfirst;
use function print_r;
use function sprintf;
use function str_repeat;
use function str_replace;
use function ucwords;
const DEFAULT_DELETE_SHORT_URL_THRESHOLD = 15;
const DEFAULT_SHORT_CODES_LENGTH = 5;
@@ -97,3 +100,8 @@ function arrayToString(array $array, int $indentSize = 4): string
);
}, '');
}
function kebabCaseToCamelCase(string $name): string
{
return lcfirst(str_replace(' ', '', ucwords(str_replace('-', ' ', $name))));
}