It seems like $file defined by \Classy\Hierarchy::get_a...file('scope', $request) on line 45 can also be of type false; however, Classy\Scope::extend_scope() 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...
47
}
48
49
return $scope;
50
}
51
52
/**
53
* Extends Scope with scope that is defined in theme_name/scope folder.
54
*
55
* @param array $scope Data for view file.
56
* @param string $view_name View's name.
57
*
58
* @return array
59
*/
60
public static function extend_scope( $scope, $view_name ) {
The variable $data seems to never exist, and therefore isset should always return false. Did you maybe rename this variable?
This check looks for calls to isset(...) or empty() on variables
that are yet undefined. These calls will always produce the same result and
can be removed.
This is most likely caused by the renaming of a variable or the removal of
a function/method parameter.
This check looks for type mismatches where the missing type is
false
. This is usually indicative of an error condtion.Consider the follow example
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 returnedfalse
before passing on the value to another function or method that may not be able to handle afalse
.