If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
41
$this->container->/** @scrutinizer ignore-call */
42
set($id, $value);
This check looks for calls to methods that do not seem to exist on a given type.
It looks for the method on the type itself as well as in inherited classes or
implemented interfaces.
This is most likely a typographical error or the method has been renamed.
Loading history...
42
}
43
44
/**
45
* @param string $id
46
* @return mixed
47
* @throws ContainerException
48
*/
49
public function has($id)
50
{
51
return $this->call('has', $id);
52
}
53
54
/**
55
* @param $id
56
* @return mixed
57
* @throws ContainerException
58
*/
59
public function make($id)
60
{
61
return $this->call('make', $id);
62
}
63
64
/**
65
* @param $method
66
* @param $id
67
*
68
* @return mixed
69
* @throws ContainerException
70
*/
71
protected function call($method, $id)
72
{
73
if (!$this->container) {
74
throw new ContainerException('Container not injected');
75
}
76
if (\method_exists($this->container, $method)) {
77
return $this->container->$method($id);
78
}
79
throw new ContainerException('Container method not found: ' . $method);
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.