$this->commandHandlerLogger?->log($this, sprintf('Something went wrong during getting content of \'%s\' item from \'%s\' bucket', $keyName, $bucketName), 'warning');
39
40
return null;
41
}
42
43
2
$this->commandHandlerLogger?->log($this, sprintf('Content from \'%s\' item was successfully obtained from \'%s\' bucket', $keyName, $bucketName));
The expression return $content could return the type true which is incompatible with the type-hinted return null|string. Consider adding an additional type-check to rule them out.