The expression return $this->content could return the type null which is incompatible with the type-hinted return string. Consider adding an additional type-check to rule them out.
Loading history...
39
}
40
41
/**
42
* @return void
43
* @throws TemplateException
44
*/
45
private function loadTemplateContent(): void
46
{
47
if (!is_file($this->templatePath)) {
48
throw new TemplateException('There is no template with given name');