for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Monofony package.
*
* (c) Monofony
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Monofony\Component\Core\Formatter;
final class StringInflector
{
public static function nameToCode(string $value): string
return str_replace([' ', '-'], '_', $value);
}
public static function nameToLowercaseCode(string $value): string
return strtolower(self::nameToCode($value));
public static function nameToUppercaseCode(string $value): string
return strtoupper(self::nameToCode($value));
private function __construct()