This function is provided for STL compatibility. It is equivalent to {@link removeFirst()}.
The list must not be empty. If the list can be empty, call isEmpty() before calling
this function.

@return mixed
190365
public function pop_front()
    {
        if ($this->count() <= 0) {
            throw new \OutOfBoundsException();
        }

        $item = $this->list[0];

        $this->removeFirst();

        return $item;
    }
348215
public static function getFirstNonEmptyElement($list, $default = null)
    {
        foreach ($list as $item) {
            if (empty($item) === false) {
                return $item;
            }
        }
        return $default;
    }
419136
public function pop() {
        $e = array_pop($this->elements);
        $this->fire(new ListDeleteEvent($e, $this->count()));
        return $e;
    }
88032
public function first()
    {
        $this->throwExceptionIfEmpty();

        $keys = $this->keys();
        $keyOfTheFirstElement = $keys->shift();
        return $this->offsetGet($keyOfTheFirstElement);
    }
165111
public function first()
    {
        $this->executeBeforeCallback();

        return count($this->items) > 0 ? reset($this->items) : null;
    }
1220285
public function first()
    {
        if (!empty($this->data)) {
            if (Collection::count($this->data) > 0) {
                return $this->data[0];
            } else {
                return;
            }
        } else {
            return;
        }
    }
700398
public function firstToSee()
    {
        if ($this->firstNewNotSeen) {
            return $this->firstNewNotSeen;
        }
        if ($this->firstEditedNotSeen) {
            return $this->firstEditedNotSeen;
        }
        return $this->latest;
    }
721668
public function removeFromList()
    {
        if ( ! $this->isInList()) return $this;

        $this->decrementPositionsOfItemsBelow();
        $this->setListPosition(null);

        return $this;
    }
1095678
public final Optional<T> first() {
        Iterator<T> iterator = this.iterator();
        return iterator.hasNext()
                ? Optional.of(iterator.next())
                : empty();
    }
942795
public function first()
	{
		$result = $this->fetchFirst(PDO::FETCH_ASSOC);

		if($result !== false)
		{
			return $this->hydrateModelsAndLoadIncludes([$result])[0];
		}

		return false;
	}
772054
public function getFirst()
    {
        $first = null;

        if (count($this->renderers) > 0) {
            $first = reset($this->renderers);
        }

        return $first;
    }
697879
public function getFirst(){
        $res = ExecImpl::get($this->context);
        if(count($res)){
            return $res[0];
        }
        return null;
    }
248964
public function getFirst()
    {
        $element = null;

        if (
            $this->hasParent() and
            $this->parent->hasElements()
        ) {
            $element = $this->parent->elements[0];
        }

        return $element;
    }
1078646
public function isEmpty()
    {
        $isEmpty = empty($this->storage);

        if ($isEmpty === false) {
            if ($this->length() == 1) {
                if (is_null($this->values()[0])) {
                    $isEmpty = true;
                }
            }
        }

        return $isEmpty;
    }
786534
public function first()
    {
        foreach ($this as $result) {
            if ($this->_statement && !$this->_useBuffering) {
                $this->_statement->closeCursor();
            }

            return $result;
        }
    }
555105
public function first()
    {
        if (!$this->isCollection()) {
            return $this;
        }

        return isset($this->data[0]) ? $this->box($this->data[0]) : null;
    }
766529
public function isEmpty()
    {
        $returnValue = (bool) false;

        
        $returnValue = (count($this->sequence) == 0);
        

        return (bool) $returnValue;
    }