protected function resolveNameByMethod(\ReflectionMethod $method): string
    {
        $name = $method->getName();

        if (preg_match('~^(?:get|is)(?<name>[a-z0-9_]+)~i', $name, $matches)) {
            return lcfirst($matches['name']);
        }

        return $name;
    }
protected function resolveNameByMethod(\ReflectionMethod $method): string
    {
        $name = $method->getName();

        if (preg_match('~^(?:get|is)(?<name>[a-z0-9_]+)~i', $name, $matches)) {
            return lcfirst($matches['name']);
        }

        return $name;
    }
protected function resolveNameByMethod ( \ ReflectionMethod $ method ) : string { $ name = $ method -> getName ( ) ; if ( preg_match ( '~^(?:get|is)(?<name>[a-z0-9_]+)~i' , $ name , $ matches ) ) { return lcfirst ( $ matches [ 'name' ] ) ; } return $ name ; }
Resolve name of attribute by method

@param  \ReflectionMethod $method
@return string
Resolve name of attribute by method