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 |
composer require ixnode/php-naming-conventionsvendor/bin/php-naming-conventions -Vphp-naming-conventions 0.1.0 (12-18-2022 01:17:26) - Björn Hempel <bjoern@hempel.li>useIxnode\PhpNamingConventions\NamingConventions;$rawString = 'Group Private';
print (newNamingConventions($rawString))->getTitle();
// (string) Group Privateprint (newNamingConventions($rawString))->getPascalCase();
// (string) GroupPrivateprint (newNamingConventions($rawString))->getCamelCase();
// (string) groupPrivateprint (newNamingConventions($rawString))->getUnderscored();
// (string) group_privateprint (newNamingConventions($rawString))->getConstant();
// (string) GROUP_PRIVATEprint (newNamingConventions($rawString))->getConfig();
// (string) group.privateprint (newNamingConventions($rawString))->getSeparated();
// (string) group-privateprint (newNamingConventions($rawString))->getRaw();
// (string) Group Privateprint (newNamingConventions($rawString))->getWords();
// (array) [[0] => group, [1] => private]git clone git@github.com:ixnode/php-naming-conventions.git &&cd php-naming-conventionscomposer installcomposer testThis tool is licensed under the MIT License - see the LICENSE file for details