src/Bag.php
public function reject(callable $predicate)
    {
        $items = [];

        foreach ($this->items as $key => $value) {
            if (!$predicate($key, $value)) {
                $items[$key] = $value;
            }
        }

        return $this->createFrom($items);
    }
public function reject(callable $predicate)
    {
        $items = [];

        foreach ($this->items as $key => $value) {
            if (!$predicate($key, $value)) {
                $items[$key] = $value;
            }
        }

        return $this->createFrom($items);
    }
public function reject ( callable $ predicate ) { $ items = [ ] ; foreach ( $ this -> items as $ key => $ value ) { if ( ! $ predicate ( $ key , $ value ) ) { $ items [ $ key ] = $ value ; } } return $ this -> createFrom ( $ items ) ; }
Returns a bag with the items that do not satisfy the `$predicate`. The opposite of {@see filter}.

Keys are preserved, so lists could need to be re-indexed.

@param callable $predicate Function is passed `($key, $value)`

@return static
Returns a bag with the items that do not satisfy the $predicate . The opposite of { @see filter } .