checks if the wizard is first time called
@return bool
977293
public function isFirstCall() {
        if (!$this->stepAction && $this->stepCollection->isFirst($this->stepCollectionIterator->current()))
            return true;
        else return false;
    }
614831
public function isObsolete()
    {
        if ($this->refreshNthRequests == 1 || $this->isRefreshNeededByProbability()) {
            return true;
        }
        if (isset($_SESSION['__HANDLER_REQUESTS_BEFORE_REFRESH'])) {
            if ($_SESSION['__HANDLER_REQUESTS_BEFORE_REFRESH'] <= 1) {
                return true; // @codeCoverageIgnore
            }
            $_SESSION['__HANDLER_REQUESTS_BEFORE_REFRESH']--;
        }
        if (isset($_SESSION['__HANDLER_SECONDS_BEFORE_REFRESH'])) {
            $timeDifference = time() - $_SESSION['__HANDLER_LAST_ACTIVITY_TIMESTAMP'];
            if ($timeDifference >= $_SESSION['__HANDLER_SECONDS_BEFORE_REFRESH']) {
                return true;
            }
        }
        return false;
    }
1123380
public static function sessionExists()
    {
        if (ini_get('session.use_cookies') == '1' && isset($_COOKIE[session_name()])) {
            return true;
        } elseif (!empty($_REQUEST[session_name()])) {
            return true;
        } elseif (self::$_unitTestEnabled) {
            return true;
        }

        return false;
    }
403995
public function getFirstRow()
    {
        $rows = $this->data['rows'];
        if (empty($rows)) {
            return false;
        }

        $row = array_slice($rows, 0, 1);

        return current($row);
    }
243481
public function first()
    {
        $result = $this->get($this->getRouteKey());

        // After route event
        if ($result && method_exists($result, 'afterRoute')) {
            $result->afterRoute();
        }

        return $result;
    }
1098909
public function previous()
	{
		if(isset($this->tokens[$this->index - 2]))
		{
			return $this->tokens[$this->index - 2];
		}
		
		return false;
	}
886293
public function iniciar()
    {
        if ($this->iniciado) {
            return true;
        }

        if (!$this->adaptador->abrir($this->nombre)) {
            throw new \RuntimeException('Hubo un error inicializando el adaptador de sesión.');
        }

        if (!$this->id) {
            $this->id = $this->generarId();
        }

        $this->datos = $this->adaptador->leer($this->id);

        return $this->iniciado = true;
    }
480425
function prev(){
		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];
	}
816111
public function getFirst()
    {
        if (0 === count($this->data)) {
            return null;
        }
        reset($this->data);

        return current($this->data);
    }
1005196
public function getFirstRecordID()
    {
        $firstID    = null;
        $keyColumn  = $this->getKeyColumn();
        $firstIdRaw = $this->getColumnsFromFlexibee([$keyColumn],
            ['limit' => 1, 'order' => $keyColumn], $keyColumn);
        if (!empty($firstIdRaw) && isset(current($firstIdRaw)[$keyColumn])) {
            $firstID = current($firstIdRaw)[$keyColumn];
        }
        return is_numeric($firstID) ? intval($firstID) : $firstID;
    }
1267466
public function previous()
    {
        if(!$this->request)
            throw new NotFoundException('Http Request does not exist.');

        $referer = $this->request->getHeaderLine('referer');

        return $referer ? : false;
    }
1153576
public function wasCalledOnce(): bool
    {
        $callsReceived = count($this->invocations);
        if (1 !== $callsReceived) {
            throw new CallAmountViolation(sprintf(
                    '%s was expected to be called once, but actually %s.',
                    $this->invocations->name(),
                    1 < $callsReceived ?
                        'called ' . $callsReceived . ' time(s)' :
                        'never called'

            ));
        }

        return true;
    }
449154
public function was_started() {

        if ($this->started === null) {
            if ($this->get_start() === 0 || $this->now < $this->get_start()) {
                // Not yet started.
                $this->started = false;
            } else {
                $this->started = true;
            }
        }

        return $this->started;
    }
261239
public function getFirstRow()
    {
        if (count($this->rows) == 0) {
            if (!is_null($this->summaryRow)) {
                return $this->summaryRow;
            }
            return false;
        }
        return reset($this->rows);
    }
701826
protected function isRepeatRelational()
    {
        $is_repeat = false;
        
        if (array_count_values($this->getParentArray())[$this->prefix] > 1) {
            $is_repeat = true;
        }
        
        return $is_repeat;
    }
1062722
public function checkExistence()
    {
        if (empty($this->primaryKey)) {
            return false;
        }

        return static::find()->pk($this->primaryKey)->count() > 0;
    }
983572
public function isErrored()
    {
        if (null === $this->data) {
            $this->initializeReport();
        }

        return isset($this->data['report']['state']) && 'errored' === $this->data['report']['state'];
    }