Create new Item by shifting current position to the next symbol
@return static|null Returns new Item with current position shifted to the next symbol.
Returns `null` then there is not next expected symbol.
323011
public function shift(): ?self
    {
        $further = $this->further;
        if (!$further) {
            return null;
        }
        $passed = $this->passed;

        $passed[] = array_shift($further);
        return new static($this->subject, $passed, $further, $this->eof, $this->tag);
    }
349709
public static function Create () {
		$args = func_num_args() === 0 ? [[]] : func_get_args();
		if ((isset($args[1]) || array_key_exists(1, $args)) && $args[1] === null) {
			unset($args[1]);
		} else {
			$args[1] = \ArrayObject::STD_PROP_LIST | \ArrayObject::ARRAY_AS_PROPS;
		}

		switch (count($args)) {
			case 3:
				return new static($args[0], $args[1], $args[2]);
			case 2:
				return new static($args[0], $args[1]);
			case 1:
				return new static($args[0]);
			default:
				return new static();
		}
	}
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;
        }
        

        
    }
504824
public function addRound()
	{
		++$this->_currentRoundNo;

		$new_round = $this->_newRound();

		$this->_rounds->offsetSet($this->_currentRoundNo, $new_round);

		return $new_round;
	}
286654
public function createNewEmbed()
    {
        $embed = $this->store->loadEmbed($this->getMetadata(), []);
        $embed->getState()->setNew();
        return $embed;
    }
1212363
public function next() {
    $this->position++;
    if ($this->position >= $this->length) {
      $this->position = $this->length;
      return NULL;
    }
    return $this->tokens[$this->position];
  }
1124533
public function current()
    {
        $this->seek($this->position);

        if ($this->count()) {
            return $this->rows[ $this->position ];
        }

        return new Row();
    }
1288803
public function shift () {
        if ($this->name === null) {
            throw new InvalidConfigException(get_class ($this) . " requires a name!");
        }
        $item = $this->getConnection ()->getClient ()->lpop ($this->name);
        $this->_data = null;
        $this->_count = null;
        return $item;
    }
722730
public function next()
    {
        if ($this->isEndReached) {
            return null;
        }
        if (null === $this->previous) {
            $this->previous = @ldap_first_entry($this->connection, $this->resultSet);
        } else {
            $this->previous = @ldap_next_entry($this->connection, $this->previous);
        }
        if (false === $this->previous) {
            $this->previous = null;
            $this->isEndReached = true;
            return null;
        }
        return new Entry($this->connection, $this->previous);
    }
391135
public function current()
    {
        if ($this->_curval == null) {
            return $this->next();
        }
        return new $this->_cls($this->_curval);
    }
902861
public function next()
    {
        if ( ! $this->queryResult ||
             ! $this->queryResult->getAffectedRows() )
        {
            $this->currentSiteInfo = null;
            return null;
        }

        $this->restoreServices();
        $this->queryResult->next();
        return $this->createCurrentSiteInfo();
    }
1373508
public function flatten()
    {
        $flattenedArray = [];
        array_walk_recursive($this->array, function ($item) use (&$flattenedArray) {
            $flattenedArray[] = $item;
        });
        $newInstance = new self();
        $newInstance->setArray($flattenedArray);
        return $newInstance;
    }
72720
public function newInstance()
    {
        $class = get_called_class();
        $instance = new $class();
        $instance->setSerializer($this->getSerializer());
        $instance->setItemConverter($this->getItemConverter()->newInstance());
        return $instance;
    }
125879
public function next() {
        $path = $this->path;

        $last = array_pop($path);

        if ($hardened = (strpos($last, "'") !== false)) {
            $last = str_replace("'", "", $last);
        }

        $last = (int)$last;
        $last += 1;

        if ($hardened) {
            $last .= "'";
        }

        $path[] = $last;

        return new static($path);
    }
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 );
				}
			}
		}
	}
201690
public function current() {
    if ($this->position >= $this->length) {
      return NULL;
    }
    return $this->tokens[$this->position];
  }
333158
public function nextPending()
    {
        if (!$this->hasPending()) {
            return null;
        }

        $current = $this->pending->current();
        $this->pending->next();

        return $current;
    }