/** * @param LogFactoryInterface $logFactory the logFactory interface. * @throws \InvalidArgumentException if $logFactory is null. */ public static function setInstance(LogFactoryInterface $logFactory) { if ($logFactory === null) { throw new \InvalidArgumentException('$logFactory should not be null.'); } LogFactory::$instance = $logFactory; }