src/Logger/src/Formatter/FluentdFormatter.php
private function clearEmptyArrayInEvent(array $event) {
        $repackEvent = [];
        foreach ($event as $key => $value) {
            if(is_array($value) && count($value) > 0) {
                $repackEvent[$key] = $this->clearEmptyArrayInEvent($value);
            }else if(!is_array($value)) {
                $repackEvent[$key] = $value;
            }
        }
        return $repackEvent;
    }
private function clearEmptyArrayInEvent(array $event) {
        $repackEvent = [];
        foreach ($event as $key => $value) {
            if(is_array($value) && count($value) > 0) {
                $repackEvent[$key] = $this->clearEmptyArrayInEvent($value);
            }else if(!is_array($value)) {
                $repackEvent[$key] = $value;
            }
        }
        return $repackEvent;
    }
private function clearEmptyArrayInEvent ( array $ event ) { $ repackEvent = [ ] ; foreach ( $ event as $ key => $ value ) { if ( is_array ( $ value ) && count ( $ value ) > 0 ) { $ repackEvent [ $ key ] = $ this -> clearEmptyArrayInEvent ( $ value ) ; } else if ( ! is_array ( $ value ) ) { $ repackEvent [ $ key ] = $ value ; } } return $ repackEvent ; }
Clear empty array in event
@param array $event
@return array
Clear empty array in event