public function addLog(string $string, array $logData = []) : bool
    {
        if (null !== $this->logger) {
            $this->logger->debug('CORs: '.$string, $logData);
            return true;
        }

        return false;
    }
public function addLog(string $string, array $logData = []) : bool
    {
        if (null !== $this->logger) {
            $this->logger->debug('CORs: '.$string, $logData);
            return true;
        }

        return false;
    }
public function addLog ( string $ string , array $ logData = [ ] ) : bool { if ( null !== $ this -> logger ) { $ this -> logger -> debug ( 'CORs: ' . $ string , $ logData ) ; return true ; } return false ; }
Add a log string if we have a logger.

@param string $string  String to log.
@param array  $logData Additional data to log.

@return bool True if logged, false if no logger.
Add a log string if we have a logger .