Are you sure the usage of skrtdev\PrototypesTests\...ion(...) { /* ... */ }) targeting skrtdev\PrototypesTests\DemoClassTest::addMethod() seems to always return null.
This check looks for function or method calls that always return null and whose
return value is used.
The method prototypeMethod() does not exist on skrtdev\PrototypesTests\DemoClassTest. 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
The method nonExistentMethod() does not exist on skrtdev\PrototypesTests\DemoClassTest. 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
25
(new DemoClassTest)->/** @scrutinizer ignore-call */ nonExistentMethod();
Loading history...
26
}
27
28
public function testCantOverridePrototypes(): void
Are you sure the usage of skrtdev\PrototypesTests\...', 'file_get_contents') targeting skrtdev\PrototypesTests\DemoClassTest::addMethod() seems to always return null.
This check looks for function or method calls that always return null and whose
return value is used.
The method methodWithNamedArguments() does not exist on skrtdev\PrototypesTests\DemoClassTest. 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
50
$this->assertEquals(12, (new DemoClassTest)->/** @scrutinizer ignore-call */ methodWithNamedArguments(named_argument: 12));
Loading history...
51
$this->assertEquals(12, (new DemoClassTest)->methodWithNamedArguments(...['named_argument' => 12]));
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.