Eris\Sample::shrink PHP Method

shrink() public method

public shrink ( $nextValue = null )
    public function shrink($nextValue = null)
    {
        if ($nextValue === null) {
            $nextValue = $this->generator->__invoke(self::DEFAULT_SIZE, $this->rand);
        }
        $this->collected[] = $nextValue->unbox();
        while ($value = $this->generator->shrink($nextValue)) {
            if ($value->unbox() === $nextValue->unbox()) {
                break;
            }
            $this->collected[] = $value->unbox();
            $nextValue = $value;
        }
        return $this;
    }