public function each(callable $callable)
    {
        $type = Reflection::firstParameterType($callable);

        foreach ($this->items as $item) {
            if (! Reflection::itemMatchesType($item, $type)) {
                continue;
            }

            $callable($item);
        }

        return $this;
    }
public function each(callable $callable)
    {
        $type = Reflection::firstParameterType($callable);

        foreach ($this->items as $item) {
            if (! Reflection::itemMatchesType($item, $type)) {
                continue;
            }

            $callable($item);
        }

        return $this;
    }
public function each ( callable $ callable ) { $ type = Reflection :: firstParameterType ( $ callable ) ; foreach ( $ this -> items as $ item ) { if ( ! Reflection :: itemMatchesType ( $ item , $ type ) ) { continue ; } $ callable ( $ item ) ; } return $ this ; }
Iterate over all the items and apply a callback. If you typehint the
item parameter in the callable, it wil only be applied to items of that
type.

@param callable $callable

@return $this
Iterate over all the items and apply a callback . If you typehint the item parameter in the callable it wil only be applied to items of that type .