ixnode/php-naming-conventions

PHP Naming Conventions

0.1.1 2022-12-19 02:56 UTC

This package is auto-updated.

Last update: 2024-04-19 13:18:06 UTC


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