src/searchOld/elastic/Search.php
protected static function filterInput(&$params)
    {
        $params = array_filter($params, function ($v) {
            if (true === is_array($v)) {
                $first = reset($v);
                return (count($v) > 0 && false === empty($first));
            } else {
                return false === empty($v);
            }
        });
    }
protected static function filterInput(&$params)
    {
        $params = array_filter($params, function ($v) {
            if (true === is_array($v)) {
                $first = reset($v);
                return (count($v) > 0 && false === empty($first));
            } else {
                return false === empty($v);
            }
        });
    }
protected static function filterInput ( & $ params ) { $ params = array_filter ( $ params , function ( $ v ) { if ( true === is_array ( $ v ) ) { $ first = reset ( $ v ) ; return ( count ( $ v ) > 0 && false === empty ( $ first ) ) ; } else { return false === empty ( $ v ) ; } } ) ; }
Leave only not empty values to work with

@param $params
Leave only not empty values to work with