Return next item from current
Also can return item with position from current + $step

@param int $step
@return Token
761570
public function getNext(int $step = 1) : Token {
      $position = ($this->position + $step);
      return $this->items[$position] ?? new Token();
    }
934551
public function previous($step = 1)
    {
        return $this->siblings(
            array_search($this, $this->parent->filters(), true) - $step
        );
    }
532090
public function moveNext()
    {
        $this->peek = 0;
        $this->token = $this->next;
        $this->next = isset($this->tokens[++$this->i]) ? $this->tokens[$this->i] : null;

        return null !== $this->next;
    }
986466
public function increment($key, $step = 1)
    {
        $connection = $this->getConnection($key);
        $this->writeToRemote(array(
            'cmd' => 'increment',
            'key' => $key,
            'step' => $step,
        ), $connection);
        return $this->readFromRemote($connection);
    }
1117292
public function increment($key, $steps = 1)
    {
        $previous = $this->cache->test($key) ? $this->cache->load($key) : 0;
        $previous += $steps;
        $this->cache->save($key, $previous);

        return $previous;
    }
942363
private static function current($step, CheckoutStepController $controller)
    {
        $currentStep = $controller->getURLParams()['Action'];
        return self::getStepIndex($step) === self::getStepIndex($currentStep);
    }
1145567
public function increment(string $key, int $step = 1): int {
		$return_value = 0;
		$success      = $this->lock($key, function($handle) use ($step, &$return_value) {
			$value      = $this->getWithLock($handle);
			$new_value  = (int)$value + $step; // (int)false === 0
			$expire     = $this->ttlWithLock($handle);
			$new_expire = ($expire === -2) ? -1 : $expire;
			if ($this->setWithLock($handle, (string)$new_value, $new_expire)) {
				$return_value = $new_value;
			}
		});
		if ($success) {
			return $return_value;
		}
		else
			throw new Exception('Manager Increment Error!');
	}
775834
public function nth($step, $offset = 0)
    {
        $new = [];

        $position = 0;

        foreach ($this->attributes as $attribute)
        {
            if($position % $step == $offset)
                $new[] = $attribute;

            $position++;
        }

        return new static($new);
    }
264668
protected function NextItem()
	{
		if ( $this->empty ) return null;

		/**
		 * @var int $index
		 */
		$index = $this->getCurrentPosition() + 1;
		if ( $index < count( $this->buffer ) )
		{
			return $this->buffer[ $index ];
		}
		else if ( ! $this->filled )
		{
			if ( ! $this->src->getIsFinished() )
			{
				if ( $this->src->MoveNext() )
				{
					$current = $this->src->getCurrent();
					$this->buffer[] = $current;
					return $current;
				}
				else
				{
					$this->filled = true;
				}
			}

			if ( ! count( $this->buffer ) )
			{
				$this->empty = true;
			}
		}

		return null;
	}
68340
public function addStep(Step $step, $priority = null)
    {
        $priority = null === $priority && $step instanceof PriorityStep ? $step->getPriority() : $priority;
        $priority = null === $priority ? 0 : $priority;

        $this->steps->insert($step, $priority);

        return $this;
    }
508155
protected function NextItem()
	{
		while (true)
		{
			if ( ! is_null( $this->childIter ) )
			{
				if ( $this->childIter instanceof ExprIterator )
				{
					$result = $this->childIter;
					$this->childIter = null;
					return $result;
				}
				else
				{
					if ( $this->childIter->MoveNext() )
						return $this->childIter->getCurrent();
					else
						$this->childIter = null;
				}
			}
			if ( ! $this->iter->MoveNext() )
				return null;

			if ( $this->owner->MoveNext( $this->provider, $this->dataPool, $this->iter->getCurrent(), $res ) )
			{
				if ( $res instanceof XPath2NodeIterator )
				{
					$this->childIter = $res;
				}
				else
				{
					$this->childIter = null;
					return $res instanceof XPathItem
						? $res
						: XPath2Item::fromValue( $res );
				}
			}
		}
	}
434928
public function next($step = 1)
    {
        return $this->siblings(
            array_search($this, $this->parent->filters(), true) + $step
        );
    }
491517
protected function NextItem()
	{
		while (true)
		{
			if ( ! $this->accept )
			{
				if ( ! $this->MoveNextIter() )
					return null;
			}
			$this->accept = $this->curr->MoveToFollowing( $this->kind );
			if ( $this->accept )
			{
				if ( $this->TestItem() )
				{
					$this->sequentialPosition++;
					return $this->curr;
				}
			}
		}
	}
8354
public function addStep(Step $step)
    {
        if (!$this->steps->contains($step)) {
            $step->setOrder($this->steps->count());
            $this->steps->add($step);
            $step->setExercise($this);
        }

        return $this;
    }
676260
public function step($step = null)
    {
        if (isset($step)) {
            $this->step = $step;
            return $this;
        } else {
            return $this->step;
        }
    }
387673
public static function getCurrent($navigation, $current) {
        self::iterateItems($navigation);
        foreach(self::$navItem as $item) {
            if($item === $current) {
                self::getCurrentItem(intval(floor(self::$navItem->getDepth() / 2)));
            }
        }
        ksort(self::$currentItems);
        return self::$currentItems;
    }
659960
protected function getStep( $step )
    {
        $store      = $this->getStore();
        $formSrv    = $this->getServiceLocator()
                           ->get( 'Form' );

        if ( $step == $this->startStep )
        {
            $form  = $formSrv->get( 'Grid\Paragraph\CreateWizard\Start' );
            $model = new StartStep( array(
                'textDomain' => 'paragraph',
            ) );
        }
        else
        {
            $store['type'] = $step;
            $form   = new Form;
            $create = $formSrv->get( 'Grid\Paragraph\Meta\Create' );
            $model  = new WizardStep( array(
                'textDomain'    => 'paragraph',
            ), array(
                'finish'        => true,
                'next'          => 'finish',
            ) );

            if ( $create->has( $step ) )
            {
                foreach ( $create->get( $step ) as $element )
                {
                    $form->add( $element );
                }
            }
            else
            {
                $edit = $formSrv->get( 'Grid\Paragraph\Meta\Edit' );

                if ( $edit->has( $step ) )
                {
                    foreach ( $edit->get( $step ) as $element )
                    {
                        $form->add( $element );
                    }
                }
                else
                {
                    $model->setOption( 'skip', true );
                }
            }
        }

        return $model->setStepForm( $form );
    }