It seems like $this->getMockBuilder(Br...doRequest'))->getMock() of type PHPUnit_Framework_MockObject_MockObject is incompatible with the declared type BringYourOwnIdeas\Mainte...l\SupportedAddonsLoader of property $loader.
Our type inference engine has found an assignment to a property that is incompatible
with the declared type of that property.
Either this assignment is in error or the assigned type should be added
to the documentation/type hint for that property..
Loading history...
20
->setMethods(['doRequest'])
21
->getMock();
22
}
23
24
public function testCallsSupportedAddonsEndpoint()
The method expects() does not exist on BringYourOwnIdeas\Mainte...l\SupportedAddonsLoader. Since you implemented __call, consider adding a @method annotation.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
26
$this->loader->/** @scrutinizer ignore-call */
27
expects($this->once())
Loading history...
27
->method('doRequest')
28
->with('addons.silverstripe.org/api/supported-addons', function () {
29
// no-op
30
});
31
32
$this->loader->getAddonNames();
33
}
34
35
public function testCallbackReturnsAddonsFromBody()
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..