petrenkoanton/key-normalizer
最新稳定版本:v2.0.0
Composer 安装命令:
composer require petrenkoanton/key-normalizer
包简介
Converts snake_case to camelCase and vice versa
README 文档
README
Installation | Functionality | Usage | For developers | License | Related projects
Installation
Requirements
- php 7.4 or higher
Composer
composer require petrenkoanton/key-normalizer
Functionality
Public methods
KeyNormalizer
| Method | Exception |
|---|---|
| toCamelCase(string $key): string | - |
| toSnakeCase(string $key): string | - |
Usage
<?php declare(strict_types=1); use KeyNormalizer\KeyNormalizer; KeyNormalizer::toCamelCase('test_test_test'); // testTestTest KeyNormalizer::toSnakeCase('testTestTest'); // test_test_test
For developers
Requirements
Utils:
- make
- docker-compose
Setup
Initialize
Create ./docker/.env
make init
Build container with the different php version
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
Other commands
Go inside of the container
make inside
Check php version
make php-v
Check package version
make v
Run tests and linters
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
License
The key-normalizer library is open-sourced software licensed under the MIT license.
Related projects
统计信息
- 总下载量: 220
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-12-24