src/League/Monga/Query/Where.php
public function getWhere()
    {
        $where = $this->where;

        if (! $where) {
            return [];
        }

        foreach ($where['$or'] as &$and) {
            if (isset($and['$and']) && count($and['$and']) === 1) {
                $and = reset($and['$and']);
            }

            if (isset($and['$or']) && count($and['$or']) === 1) {
                $and = reset($and['$or']);
            }
        }

        if (count($where['$or']) === 1) {
            $where = reset($where['$or']);
        }

        return $where;
    }
public function getWhere()
    {
        $where = $this->where;

        if (! $where) {
            return [];
        }

        foreach ($where['$or'] as &$and) {
            if (isset($and['$and']) && count($and['$and']) === 1) {
                $and = reset($and['$and']);
            }

            if (isset($and['$or']) && count($and['$or']) === 1) {
                $and = reset($and['$or']);
            }
        }

        if (count($where['$or']) === 1) {
            $where = reset($where['$or']);
        }

        return $where;
    }
public function getWhere ( ) { $ where = $ this -> where ; if ( ! $ where ) { return [ ] ; } foreach ( $ where [ '$or' ] as & $ and ) { if ( isset ( $ and [ '$and' ] ) && count ( $ and [ '$and' ] ) === 1 ) { $ and = reset ( $ and [ '$and' ] ) ; } if ( isset ( $ and [ '$or' ] ) && count ( $ and [ '$or' ] ) === 1 ) { $ and = reset ( $ and [ '$or' ] ) ; } } if ( count ( $ where [ '$or' ] ) === 1 ) { $ where = reset ( $ where [ '$or' ] ) ; } return $ where ; }
Retrieve the formatted where filter

@return array filter query
Retrieve the formatted where filter