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