* @copyright Meritoo */ class TemplateNotFoundException extends Exception { /** * Creates the exception * * @param string $index Index that should contain template, but it was not found * @return TemplateNotFoundException */ public static function create(string $index): TemplateNotFoundException { $template = 'Template with \'%s\' index was not found. Did you provide all required templates?'; $message = sprintf($template, $index); return new static($message); } }