Are you sure the usage of $action->getRestoreActio...sionedObject(), 'Test') targeting SilverStripe\VersionedAd...ion::getRestoreAction() seems to always return null.
This check looks for function or method calls that always return null and whose
return value is used.
The function PHPUnit\Framework\MockOb...ckBuilder::setMethods() has been deprecated: https://github.com/sebastianbergmann/phpunit/pull/3687
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated annotation
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.