ixnode / php-naming-conventions
PHP Naming Conventions
0.1.1
2022-12-19 02:56 UTC
Requires
- php: ^8.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.13
- ixnode/bash-version-manager: ^0.1.3
- phpmd/phpmd: ^2.13
- phpstan/phpstan: ^1.9
- phpunit/phpunit: ^9.5
- povils/phpmnd: ^3.0
- rector/rector: ^0.15.1
README
This library translate a given string or convention into another convention. The following conventions are supported:
Convention | Representation |
---|---|
raw |
A raw string |
words |
['a', 'raw', 'string'] |
title |
A Raw String |
pascalCase |
ARawString |
camelCase |
aRawString |
under_scored |
a_raw_string |
config |
a.raw.string |
constant |
A_RAW_STRING |
Installation
composer require ixnode/php-naming-conventions
vendor/bin/php-naming-conventions -V
php-naming-conventions 0.1.0 (12-18-2022 01:17:26) - Björn Hempel <bjoern@hempel.li>
Usage
use Ixnode\PhpNamingConventions\NamingConventions;
$pascalCase = (new NamingConventions($rawString))->getPascalCase();
Development
git clone git@github.com:ixnode/php-naming-conventions.git && cd php-naming-conventions
composer install
composer test
License
This tool is licensed under the MIT License - see the LICENSE file for details