jaroslavtyc/drd-plus-therugist-spells

View on GitHub
DrdPlus/Theurgist/Spells/SpellParameters/Partials/GetParameterNameTrait.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php
declare(strict_types = 1);

namespace DrdPlus\Theurgist\Spells\SpellParameters\Partials;

use Granam\String\StringTools;

trait GetParameterNameTrait
{

    /**
     * @return string
     */
    protected function getParameterName(): string
    {
        $snakeCaseBaseName = StringTools::camelCaseToSnakeCasedBasename(static::class);

        return str_replace('_', ' ', $snakeCaseBaseName);
    }
}