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

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

        return new static($items);
    }
public function reject(callable $predicate): ArrayCollection
    {
        $items = [];

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

        return new static($items);
    }
public function reject ( callable $ predicate ) : ArrayCollection { $ items = [ ] ; foreach ( $ this -> items as $ key => $ value ) { if ( ! $ predicate ( $ value , $ key ) ) { $ items [ $ key ] = $ value ; } } return new static ( $ items ) ; }
Creates a collection from items that fail a truth test

Predicate signature:

<code>
function ($value, $key): bool {}
</code>

@param callable $predicate The predicate function

@return ArrayCollection
Creates a collection from items that fail a truth test