Installation | Functionality | Usage | For developers | License | Related projects
- php 7.4 or higher
composer require petrenkoanton/key-normalizer
Method | Exception |
---|---|
toCamelCase(string $key): string | - |
toSnakeCase(string $key): string | - |
<?php
declare(strict_types=1);
use KeyNormalizer\KeyNormalizer;
KeyNormalizer::toCamelCase('test_test_test'); // testTestTest
KeyNormalizer::toSnakeCase('testTestTest'); // test_test_test
Utils:
- make
- docker-compose
Create ./docker/.env
make init
php 8.0
make up80
php 8.1
make up81
php 8.2
make up82
php 8.3
make up83
Also you need to run this command before build container with another php version. It will remove network and previously created container.
make down
Go inside of the container
make inside
Check php version
make php-v
Check package version
make v
Run PHPUnit tests with code coverage
make test-c
Run Psalm
make psalm
Run PHP_CodeSniffer
make phpcs
Or by all-in-one command from the inside of the container
composer check-all
The key-normalizer library is open-sourced software licensed under the MIT license.