src/Collection.php
public function assert(callable $callback): bool
    {
        foreach ($this->items as $key => $item) {
            if ($callback($item, $key) === false) {
                return false;
            }
        }

        return true;
    }
public function assert(callable $callback): bool
    {
        foreach ($this->items as $key => $item) {
            if ($callback($item, $key) === false) {
                return false;
            }
        }

        return true;
    }
public function assert ( callable $ callback ) : bool { foreach ( $ this -> items as $ key => $ item ) { if ( $ callback ( $ item , $ key ) === false ) { return false ; } } return true ; }
Assert that all elements pass the test provided by the callback

@param callable $callback

@return bool
Assert that all elements pass the test provided by the callback