src/Viserio/Component/Manager/Traits/ManagerTrait.php
protected static function studly(string $value): string
    {
        $key = $value;

        if (isset(static::$studlyCache[$key])) {
            return static::$studlyCache[$key];
        }

        if (\ctype_upper(\str_replace(['_', '-'], '', $value))) {
            $value = \mb_strtolower($value);
        }

        $value = \ucwords(\str_replace(['-', '_'], ' ', $value));

        return static::$studlyCache[$key] = \str_replace(' ', '', $value);
    }
protected static function studly(string $value): string
    {
        $key = $value;

        if (isset(static::$studlyCache[$key])) {
            return static::$studlyCache[$key];
        }

        if (\ctype_upper(\str_replace(['_', '-'], '', $value))) {
            $value = \mb_strtolower($value);
        }

        $value = \ucwords(\str_replace(['-', '_'], ' ', $value));

        return static::$studlyCache[$key] = \str_replace(' ', '', $value);
    }
Convert a value to studly caps case.

@param string $value

@return string