If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
16
$previous->/** @scrutinizer ignore-call */
17
getMessage() .
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...
17
1
' Perhaps need initialize "WidgetFactory" with container for resolve dependencies.',
18
1
previous: $previous,
19
1
);
20
}
21
22
1
public function getName(): string
23
{
24
1
return 'Failed to create a widget. ' . $this->previous->getMessage();
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
24
return 'Failed to create a widget. ' . $this->previous->/** @scrutinizer ignore-call */ getMessage();
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...
25
}
26
27
public function getSolution(): ?string
28
{
29
return <<<'SOLUTION'
30
Perhaps need initialize `WidgetFactory` with container for resolve dependencies.
31
32
To initialize the widget factory call `WidgetFactory::initialize()` before using the widget.
33
It is a good idea to do that for the whole application.
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.