It seems like $file defined by \ClassyHierarchy::get_av...e('template', $request) on line 26 can also be of type false; however, ClassyTemplate::get_blade_template() does only seem to accept string, did you maybe forget to handle an error condition?
This check looks for type mismatches where the missing type is false. This
is usually indicative of an error condtion.
This function either returns a new DateTime object or false, if there was an error.
This is a typical pattern in PHP programming to show that an error has occurred without
raising an exception. The calling code should check for this returned false
before passing on the value to another function or method that may not
be able to handle a false.
Loading history...
29
30
return $template;
31
32
}
33
34
35
/**
36
* Replaces all slashes with dots
37
*
38
* @param string $template
39
* @return string
40
*/
41
public static function get_blade_template($template) {
42
43
return str_replace('/', '.', $template);
44
45
}
46
47
48
/**
49
* Returns list of theme page templates
50
*
51
* @return array
52
*/
53
public static function get_page_templates_list() {
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.