Mellivora/Support/Collection.php
public function every($key, $operator = null, $value = null)
    {
        if (func_num_args() === 1) {
            $callback = $this->valueRetriever($key);

            foreach ($this->items as $k => $v) {
                if (!$callback($v, $k)) {
                    return false;
                }
            }

            return true;
        }

        if (func_num_args() === 2) {
            $value = $operator;

            $operator = '=';
        }

        return $this->every($this->operatorForWhere($key, $operator, $value));
    }
public function every($key, $operator = null, $value = null)
    {
        if (func_num_args() === 1) {
            $callback = $this->valueRetriever($key);

            foreach ($this->items as $k => $v) {
                if (!$callback($v, $k)) {
                    return false;
                }
            }

            return true;
        }

        if (func_num_args() === 2) {
            $value = $operator;

            $operator = '=';
        }

        return $this->every($this->operatorForWhere($key, $operator, $value));
    }
public function every ( $ key , $ operator = null , $ value = null ) { if ( func_num_args ( ) === 1 ) { $ callback = $ this -> valueRetriever ( $ key ) ; foreach ( $ this -> items as $ k => $ v ) { if ( ! $ callback ( $ v , $ k ) ) { return false ; } } return true ; } if ( func_num_args ( ) === 2 ) { $ value = $ operator ; $ operator = '=' ; } return $ this -> every ( $ this -> operatorForWhere ( $ key , $ operator , $ value ) ) ; }
Determine if all items in the collection pass the given test.

@param callable|string $key
@param mixed           $operator
@param mixed           $value

@return bool
Determine if all items in the collection pass the given test .