public function filter(callable $callback = null)
    {
        if (is_null($callback)) {
            $this->setInternalValue(array_filter($this->getInternalValue()));
        } else {
            $this->setInternalValue(array_filter($this->getInternalValue(), $callback, ARRAY_FILTER_USE_BOTH));
        }

        return $this;
    }
public function filter(callable $callback = null)
    {
        if (is_null($callback)) {
            $this->setInternalValue(array_filter($this->getInternalValue()));
        } else {
            $this->setInternalValue(array_filter($this->getInternalValue(), $callback, ARRAY_FILTER_USE_BOTH));
        }

        return $this;
    }
public function filter ( callable $ callback = null ) { if ( is_null ( $ callback ) ) { $ this -> setInternalValue ( array_filter ( $ this -> getInternalValue ( ) ) ) ; } else { $ this -> setInternalValue ( array_filter ( $ this -> getInternalValue ( ) , $ callback , ARRAY_FILTER_USE_BOTH ) ) ; } return $ this ; }
Modify the collection using a callable to determine which values to include

Optional callable which returns TRUE if the value should be included, FALSE otherwise.

If a callback is not provided, only values which are TRUE (see converting to boolean) will be included.

Callback has the following form:

`bool callback (mixed $value, mixed $key)`

With:
- value: the value of the current iteration
- key: the key of the current iteration

@param callable|null $callback

@return $this
Modify the collection using a callable to determine which values to include