protected function compile(string $templateContents, string $fullyQualifiedClassName) : string
    {
        $explodedClass = explode('\\', $fullyQualifiedClassName);
        $namespace = implode('\\', array_slice($explodedClass, 0, -1));
        $className = end($explodedClass);
        $compiledTemplate = str_replace('{{namespace}}', $namespace, $templateContents);
        $compiledTemplate = str_replace('{{class}}', $className, $compiledTemplate);

        return $compiledTemplate;
    }
protected function compile(string $templateContents, string $fullyQualifiedClassName) : string
    {
        $explodedClass = explode('\\', $fullyQualifiedClassName);
        $namespace = implode('\\', array_slice($explodedClass, 0, -1));
        $className = end($explodedClass);
        $compiledTemplate = str_replace('{{namespace}}', $namespace, $templateContents);
        $compiledTemplate = str_replace('{{class}}', $className, $compiledTemplate);

        return $compiledTemplate;
    }
protected function compile ( string $ templateContents , string $ fullyQualifiedClassName ) : string { $ explodedClass = explode ( '\\' , $ fullyQualifiedClassName ) ; $ namespace = implode ( '\\' , array_slice ( $ explodedClass , 0 , - 1 ) ) ; $ className = end ( $ explodedClass ) ; $ compiledTemplate = str_replace ( '{{namespace}}' , $ namespace , $ templateContents ) ; $ compiledTemplate = str_replace ( '{{class}}' , $ className , $ compiledTemplate ) ; return $ compiledTemplate ; }
Compiles a template

@param string $templateContents The template to compile
@param string $fullyQualifiedClassName The fully-qualified class name
@return string the compiled template
Compiles a template