It seems like $client->getLogger() can also be of type null; however, parameter $logger of Matecat\SimpleS3\Compone...erLogger::__construct() does only seem to accept Psr\Log\LoggerInterface, 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
38
$this->commandHandlerLogger = new CommandHandlerLogger(/** @scrutinizer ignore-type */ $client->getLogger());