NextItem
@return XPathItem
978811
protected function NextItem()
	{
		while (true)
		{
			if ( ! is_null( $this->childIter ) )
			{
				if ( $this->childIter->MoveNext() )
					return $this->childIter->getCurrent();
				else
					$this->childIter = null;
			}

			if ( $this->index == count( $this->nodes ) )
				return null;

			$res = $this->nodes[ $this->index++ ]->Execute( $this->provider, $this->dataPool );
			if ( $res instanceof Undefined ) continue;

			if ( $res instanceof XPath2NodeIterator )
			{
				// BMS 2018-02-28 Seems like this is necessary because if the iterator has been used before the index will be wrong
				$res->Reset();
				$this->childIter = $res;
			}
			else
			{
				if ( $res instanceof XPathItem )
					return $res;

				return XPath2Item::fromValue( $res );
			}
		}
	}
902861
public function next()
    {
        if ( ! $this->queryResult ||
             ! $this->queryResult->getAffectedRows() )
        {
            $this->currentSiteInfo = null;
            return null;
        }

        $this->restoreServices();
        $this->queryResult->next();
        return $this->createCurrentSiteInfo();
    }
980952
function next(){
		if( ! $this->length ){
			return false;
		}
		$p = $this->p + 1;
		if( !isset($this->children[$p]) ){
			$this->p = 0;
			return false;
		}
		$this->p = $p;
		return $this->children[$p];
	}
258476
public function next() {


        // if this is a valid name
        if ($this->isValid()) {

            // find it on the index of colors
            $colorNames = Colors::getW3CIndex();

            // get the position of the name in the color index
            $pos = array_search($this->name,$colorNames);

            // if it was found on the array
            if ($pos !== false) {

                // if is the last item on the list
                if ($pos === (count($colorNames)-1)) {

                    // return the first item
                    return $colorNames[0];

                // it is not last
                } else {

                    // simply return the next item on the list
                    return $colorNames[$pos+1];
                }

            // name not found in list
            } else {

                // if it is not a W3C color, return null
                return null;

            }

        // invalid color
        } else {
            return null;
        }
        

        
    }
1164331
public function next()
    {
        $this->currentOverriddenEvent = null;
        ++$this->counter;
        if ($this->nextDate) {
            // We had a stored value.
            $nextDate = $this->nextDate;
            $this->nextDate = null;
        } else {
            // We need to ask rruleparser for the next date.
            // We need to do this until we find a date that's not in the
            // exception list.
            do {
                if (!$this->recurIterator->valid()) {
                    $nextDate = null;
                    break;
                }
                $nextDate = $this->recurIterator->current();
                $this->recurIterator->next();
            } while (isset($this->exceptions[$nextDate->getTimeStamp()]));
        }

        // $nextDate now contains what rrule thinks is the next one, but an
        // overridden event may cut ahead.
        if ($this->overriddenEventsIndex) {
            $offsets = end($this->overriddenEventsIndex);
            $timestamp = key($this->overriddenEventsIndex);
            $offset = end($offsets);
            if (!$nextDate || $timestamp < $nextDate->getTimeStamp()) {
                // Overridden event comes first.
                $this->currentOverriddenEvent = $this->overriddenEvents[$offset];

                // Putting the rrule next date aside.
                $this->nextDate = $nextDate;
                $this->currentDate = $this->currentOverriddenEvent->DTSTART->getDateTime($this->timeZone);

                // Ensuring that this item will only be used once.
                array_pop($this->overriddenEventsIndex[$timestamp]);
                if (!$this->overriddenEventsIndex[$timestamp]) {
                    array_pop($this->overriddenEventsIndex);
                }

                // Exit point!
                return;
            }
        }

        $this->currentDate = $nextDate;
    }
1359116
protected function NextItem()
	{
		/**
		 * @var \XBRL $taxonomy
		 */
		$taxonomy = $this->context->xbrlTaxonomy;

		$memberPathPartsCount = count( explode( "/", $this->memberPath ) );

		while ( true )
		{
			if ( is_null( $this->candidates ) || ! is_array( $this->candidates ) || $this->index >= count( $this->candidates ) )
			{
				return null;
			}

			$candidaterPath = $this->candidates[ $this->index++ ];
			$candidaterPathParts = explode( "/", $candidaterPath );

			if ( $this->axis == "DRS-child" )
			{
				// The member at the index can only be child.
				// That is, the count of parts can only be the same as $memberPathPartsCount or just one greater
				if ( count( $candidaterPathParts ) > $memberPathPartsCount + 1 )
				{
					continue;
				}
			}

			$member = $candidaterPathParts[ count( $candidaterPathParts ) - 1 ];
			$memTaxonomy = $taxonomy->getTaxonomyForXSD( $member );
			$memberId = trim( strrchr( $member, "#"), "#" );
			$memElement = $memTaxonomy->getElementById( $memberId );
			$result = QNameValue::fromNCName( "{$memTaxonomy->getPrefix()}:{$memElement['name']}", $this->context->NamespaceManager );

			return $result;

		}

		return null;
	}
211485
protected function NextItem()
	{
		$keys = array_keys( $this->itemSet );

		while ( $this->elementIndex < count( $keys ) )
		{
			/**
			 * @var array $elements
			 */
			$elements = $this->itemSet[ $keys[ $this->elementIndex ] ];

			while ( $this->index < count( $elements ) )
			{
				/**
				 * @var XPathItem $item
				 */
				$item = $elements[ $this->index++ ] ;

				if ( $item instanceof XPathNavigator )
				{
					/**
					 * @var XPathNavigator $node
					 */
					$node = $item;

					if ( ! is_null( $this->lastNode ) )
					{
						if ( $this->lastNode->IsSamePosition( $node ) )
						{
							continue;
						}
					}
					$this->lastNode = $node->CloneInstance();
				}

				return $item;
			}

			$this->elementIndex++;
			$this->index = 0;
			$this->lastNode = null;
		}
		return null;
	}
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;
    }
1322536
public function next()
    {
        if ($this->trailCount > 0) {

            while ($this->trailCount > 0) {
                $trailEntry = $this->popFromTrail();
                $component = $trailEntry[1];
                $source = $trailEntry[0];

                if ($this->isTraversed($component) === false) {
                    $this->currentComponent = $component;
                    $this->currentContainer = $source;
                    $this->pushOnTrail($component, $this->currentComponent->getComponents());
                    $this->markTraversed($this->currentComponent);

                    if (empty($this->classes) === true || in_array($this->currentComponent->getQTIClassName(), $this->classes) === true) {
                        // If all classes are seeked or the current component has a class name
                        // that must be seeked, stop the iteration.
                        return;
                    }
                }
            }

            $this->isValid = false;
            $this->currentContainer = null;
        } else {
            $this->isValid = false;
            $this->currentContainer = null;
        }
    }
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;
    }
547870
protected function NextItem()
	{
		/**
		 * @var \XBRL_Instance $instance
		 */
		$instance = $this->context->xbrlInstance;

		while ( true )
		{
			if ( ! $this->iterator->MoveNext() )
			{
				return null;
			}

			$node = $this->iterator->getCurrent();

			if ( $this->nonNilOnly )
			{
				// Look for an xsi:nil and ignore the element if there is one
				$nodeTest = XmlQualifiedNameTest::create( "nil", SCHEMA_INSTANCE_NAMESPACE );
				$attributes = AttributeNodeIterator::fromNodeTest( $this->context, $nodeTest, XPath2NodeIterator::Create( $node ) );
				if ( $attributes->MoveNext() )
				{
					// There is an attrubute.  It is true?
					if ( filter_var( $attributes->getCurrent()->getValue(), FILTER_VALIDATE_BOOLEAN ) )
					{
						continue;
					}
				}
			}

			// Look up the node namespace in the instance taxonomy
			$taxonomy = $instance->getTaxonomyForNamespace( $node->getNamespaceURI() );
			if ( ! $taxonomy )
			{
				continue;
			}

			$prefix = $taxonomy->getPrefix();

			$taxonomyElement = $this->types->getElement( $node->getLocalName(), $prefix  );
			if ( ! $taxonomyElement )
			{
				continue;
			}

			// This node MUST have a substitution group attribute and the attribute MUST resolve to xbrli:tuple or xbrli:item
			if ( ! isset( $taxonomyElement['substitutionGroup'] ) )
			{
				continue;
			}

			if ( ! $this->types->resolveToSubstitutionGroup( $taxonomyElement['substitutionGroup'], $this->substitutionGroups ) )
			{
				continue;
			}

			// If the node value is empty themn apply the schema default (if there is one)
			if ( isset( $taxonomyElement['default'] ) && empty( $node->getUnderlyingObject()->nodeValue ) )
			{
				$node->getUnderlyingObject()->nodeValue = $taxonomyElement['default'];
			}

			return $node->CloneInstance();
		}

	}
1067280
public function next()
    {
        $this->peek = 0;
        if (isset($this->tokens[$this->current])) {
            return $this->tokens[$this->current++];
        }
    }
1044535
protected function getNext() {
		if ($this->get('page')< $this->pageTotal) {
			return $this->replaceLine($this->get('page')+ 1, $this->get('next'));
		}
		return null;
	}
442253
public function moveHigher()
    {
        $higherItem = $this->higherItem();

        if ( ! $higherItem) return $this;

        $this->getConnection()->transaction(function() use ($higherItem) {

            $this->decrement($this->positionColumn());

            // Increment is not guaranteed to work with global scopes,
            $higherItem->{$this->positionColumn()} = $higherItem->{$this->positionColumn()} + 1;
            $higherItem->save();
        });

        return $this;
    }
4724
public function next() {
		if ($this->_buffer) {
			list($this->_key, $this->_current) = array_shift($this->_buffer);
			return $this->_current;
		}

		if (!$next = $this->_fetch()) {
			$this->_key = null;
			$this->_current = null;
			$this->_valid = false;

			return null;
		} else {
			list($this->_key, $this->_current) = $next;
			$this->_valid = true;
		}
		return $this->_current;
	}
1304522
def next(self):
        """"""
        item = six.next(self._item_iter)
        result = self._item_to_value(self._parent, item)
        # Since we've successfully got the next value from the
        # iterator, we update the number of remaining.
        self._remaining -= 1
        return result
1092694
public function next()
    {
        if (!$this->_router) {
            $this->_router = $this->router->getRouter();
        }

        $vitex = Vitex::getInstance();
        $call = $this->_router->current();
        if (is_callable($call)) {
            call_user_func($call, $vitex->req, $vitex->res, function () {
                $this->nextRouter();
            });
        } else {
            call_user_func($this->_notfound, $vitex->req, $vitex->res, function () {
                $this->nextRouter();
            });
        }
        return $this;
    }