It seems like hasRoute() must be provided by classes using this trait. How about adding it as abstract method to this trait?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
30
/** @scrutinizer ignore-call */
31
$route = $this->hasRoute($name);
Loading history...
31
if ($route) {
32
return $name;
33
}
34
return $this->initMvcRoute($name, $params);
35
}
36
37
/**
38
* @param $name
39
* @param array $params
40
* @return string
41
*/
42
protected function initMvcRoute($name, &$params = [])
43
{
44
$parts = explode(".", $name);
45
$count = count($parts);
46
if ($count > 3) {
47
return $name;
48
}
49
$firstPart = strtolower(reset($parts));
50
if (!in_array($firstPart, app('mvc.modules')->getNames())) {