Get the next interation.

@return int

@SuppressWarnings(PHPMD.ExitExpression)
510324
private function getNextInteration()
    {
        // Get the next interator.
        $migrations = new Filesystem(new Adapter(base_path('database/migrations')));

        try {
            $files = $migrations->listContents();
        } catch (\Exception $exception) {
            $this->error($exception->getMessage());

            exit(1);
        }

        $files_filtered = array_filter($files, function ($value) {
            return stripos($value['filename'], date('Y_m_d')) !== false;
        });

        if (count($files_filtered) == 0) {
            return 1;
        }

        $files_filtered = array_column($files_filtered, 'path');

        sort($files_filtered);
        $latest_file = array_pop($files_filtered);
        $latest_details = explode('_', $latest_file);

        return (int) $latest_details[3] + 1;
    }
11505
public function getNext()
    {
        if (count($this->pagination) == 0) {
            $this->get();
        }
        
        if ($this->page < $this->pagination['total_pages']) {
            $this->page++;
            return $this->get();
        }
        
        return false;
    }
175017
public function getNextRelease()
    {
        if (!$this->nextRelease) {
            $manual = $this->getOption('release');
            $manual = $this->isRelease($manual) ? $manual : null;

            $this->nextRelease = $manual ?: $this->bash->getTimestamp();
        }

        return $this->nextRelease;
    }
562089
public function getNextToken()
    {
        if (null === $this->_nextToken) {
            $tokenSelect = $this->tracker->getTokenSelect();
            $tokenSelect
                    ->andReceptionCodes()
                    ->forPreviousTokenId($this->_tokenId);

            if ($tokenData = $tokenSelect->fetchRow()) {
                $this->_nextToken = $this->tracker->getToken($tokenData);
                $this->_nextToken->_previousToken = $this;
            } else {
                $this->_nextToken = false;
            }
        }

        return $this->_nextToken;
    }
363798
private function nextTimeout(): ?int
    {
        $time = \microtime(true);
        
        while (!$this->scheduler->isEmpty()) {
            list ($watcher, $scheduled) = $this->scheduler->top();
            
            if ($watcher->enabled && $watcher->scheduled === $scheduled) {
                return (int) \max(0, ($watcher->due - $time) * 1000000);
            }
        }
        
        return null;
    }
7932
public function getNextSibling()
	{
		$left = $this->getRightValue() + 1;
		$searchCondition = $this->repository->createSearchCondition()
				->leftEqualsTo($left);

		$nextSibling = $this->repository->search($searchCondition);
		if ( ! isset($nextSibling[0])) {
			return null;
		}
		$nextSibling = $nextSibling[0];
		
		return $nextSibling;
	}
896977
protected function NextItem()
	{
		while (true)
		{
			if ( ! is_null( $this->childIter ) )
			{
				if ( $this->childIter->MoveNext() )
					return $this->childIter->getCurrent();
				else
					$this->childIter = null;
			}

			if ( $this->iter->MoveNext() )
			{
				$res = $this->iter->current();

				if ( $res instanceof XPath2NodeIterator )
				{
					$this->childIter = $res;
				}
				else
				{
					$this->childIter = null;
					return $res instanceof XPathItem
						? $res
						: XPath2Item::fromValue( $res );
				}
			}
			else
			{
				return null;
			}
		}
	}
58971
public function next() {
        $this->is->next();
        if ($this->is->valid()) {
            if ($this->debug)
                fprintf(STDOUT, "> %s\n", $this->is->current());
            return $this->is->current();
        }

        return false;
    }
1182886
public function getNextAutoIncrement() {
		$query = "SHOW TABLE STATUS WHERE name = '" . $this->getTable() . "'";
		$statement = $this->_connection->execute($query);
		$result = $statement->fetch();
		if (!isset($result[10])) {
			return false;
		}
		return (int)$result[10];
	}
533660
protected function getNext()
    {
        if (!$this->current)
        {
            return null;
        }
        if ($this->next !== -1)
        {
            return $this->next;
        }
        $this->load();
        for ($i = 0; $i < count($this->items); $i++)
        {
            if ($this->items[$i]->id == $this->current->id)
            {
                if ($i + 1 < count($this->items))
                {
                    $this->next = $this->items[$i + 1];
                    return $this->next;
                }
                break;
            }
        }
        return null;
    }
1212363
public function next() {
    $this->position++;
    if ($this->position >= $this->length) {
      $this->position = $this->length;
      return NULL;
    }
    return $this->tokens[$this->position];
  }
1226463
public function currentLine() {
        if (empty($this->EOF) || $this->char == 0) {
            return 1;
        }
        // Add one to $this->char because we want the number for the next
        // byte to be processed.
        return substr_count($this->data, "\n", 0, min($this->char, $this->EOF)) + 1;
    }
1070574
public function getSequenceNumber()
    {
        foreach ($this->thread->posts as $index => $post) {
            if ($post->id == $this->id) {
                return $index + 1;
            }
        }
    }
1177710
public function next()
    {
        if (count($this->data) > 0) {
            array_shift($this->data);
        }
        ++$this->position;

        if (count($this->data) == 0 && !is_null($this->resumptionToken)) {
            $this->fetchMore();
        }

        if (count($this->data) == 0) {
            return null;
        }
    }
332697
public function getNextNumber()
    {
        if (0 === (int) $this->countTotal()) {
            return 1;
        }

        $qb = $this->getQueryBuilder()
            ->select('MAX(i.invoiceNumber) + 1');

        return $qb->getQuery()
            ->getSingleScalarResult();
    }
539842
public function nextRowset()
    {
        if ( false !== ( $result = $this->_statement->nextRowset() ) )
        {
            $this->_index = null;
        }

        return $result;
    }
649903
public function get_next_id()
    {
        return (int) $this->_database->select('AUTO_INCREMENT')
            ->from('information_schema.TABLES')
            ->where('TABLE_NAME', $this->_table)
            ->where('TABLE_SCHEMA', $this->_database->database)->get()->row()->AUTO_INCREMENT;
    }