It seems like $this->kernel can also be of type null; however, parameter $kernel of Micro\Plugin\Locator\Loc...rFactory::__construct() does only seem to accept Micro\Framework\Kernel\KernelInterface, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
49
return new LocatorFactory(/** @scrutinizer ignore-type */ $this->kernel);