public function sanitizeEventFilter($filters)
    {
        if (!is_array($filters)) {
            throw new \InvalidArgumentException('filters parameter must be an array');
        }

        if (!isset($filters['search'])) {
            $filters['search'] = '';
        }

        if (!isset($filters['includeEvents'])) {
            $filters['includeEvents'] = [];
        }

        if (!isset($filters['excludeEvents'])) {
            $filters['excludeEvents'] = [];
        }

        return $filters;
    }
public function sanitizeEventFilter($filters)
    {
        if (!is_array($filters)) {
            throw new \InvalidArgumentException('filters parameter must be an array');
        }

        if (!isset($filters['search'])) {
            $filters['search'] = '';
        }

        if (!isset($filters['includeEvents'])) {
            $filters['includeEvents'] = [];
        }

        if (!isset($filters['excludeEvents'])) {
            $filters['excludeEvents'] = [];
        }

        return $filters;
    }
public function sanitizeEventFilter ( $ filters ) { if ( ! is_array ( $ filters ) ) { throw new \ InvalidArgumentException ( 'filters parameter must be an array' ) ; } if ( ! isset ( $ filters [ 'search' ] ) ) { $ filters [ 'search' ] = '' ; } if ( ! isset ( $ filters [ 'includeEvents' ] ) ) { $ filters [ 'includeEvents' ] = [ ] ; } if ( ! isset ( $ filters [ 'excludeEvents' ] ) ) { $ filters [ 'excludeEvents' ] = [ ] ; } return $ filters ; }
Makes sure that the event filter array is in the right format.

@param mixed $filters

@return array

@throws \InvalidArgumentException if not an array
Makes sure that the event filter array is in the right format .