During 5 days after the last expiration client is able to refuse server with full refund.
Method checks, whether 5 days passed.
@return bool
326901
public function canFullRefuse()
    {
        if (!is_numeric($this->last_expires)) {
            return null; // In case server is not sold
        }

        return (time() - Yii::$app->formatter->asTimestamp($this->last_expires)) / 3600 / 24 < 5;
    }
1295111
function check_expiration() {
		$license_data = get_option( $this->product->get_key() . '_license_data', '' );
		if ( '' === $license_data ) {
			return false;
		}
		if ( ! isset( $license_data->expires ) ) {
			return false;
		}
		if ( strtotime( $license_data->expires ) - time() > 30 * 24 * 3600 ) {
			return false;
		}

		return true;
	}
395836
public function expired()
    {
        if (empty($this->expiresOn)) {
            return false;
        }

        return AnDomainAttributeDate::getInstance()->toDate()->compare($this->expiresOn) > 0;
    }
1080581
protected function ban()
    {
        $rule             = Rule::firstOrNew([
                    'value'           => request()->getClientIp(),
                    'trusted'         => 0,
                    'internal_reason' => trans('antares/ban_management::messages.too_many_requests'),
                    'reason'          => trans('antares/ban_management::messages.too_many_requests'),
        ]);
        $rule->expired_at = time() + array_get($this->config, 'enable_after', 60);
        $rule->status     = 1;
        $rule->enabled    = 1;
        return $this->repository->store($rule);
    }
455794
private function canRetry()
    {
        if ($this->isUnlimitedAttempts()) {
            return true;
        }

        $this->attempts++;

        return $this->attempts < $this->maxAttempts;
    }
831144
public  function isExpired(){
        $now = new DateTime(gmdate('Y-m-d H:i:s'));
        $expire = new Datetime($this->expiry_dtime);
        return $now >= $expire;
    }
1157247
public function isConfirmationExpired()
    {
        $ttl = \Config::get('df.confirm_code_ttl', 1440);
        $lastModTime = strtotime($this->last_modified_date);
        $code = $this->confirm_code;

        if ('y' !== $code && !is_null($code) && ((time() - $lastModTime) > ($ttl * 60))) {
            return true;
        } else {
            return false;
        }
    }
1010811
public function isExpiredLink()
    {
        if (($sKey = $this->getUpdateId())) {
            $blExpired = oxNew(\OxidEsales\Eshop\Application\Model\User::class)->isExpiredUpdateId($sKey);
        }

        return $blExpired;
    }
355547
public function isExpired()
    {
        $ret = true;

        $now = new \DateTime();
        if ($this->expirationDate > $now) {
            $ret = false;
        }

        return $ret;
    }
568033
protected function checkAndStoreTime()
    {
        Timer::start();

        $result = $this->check();

        $result->elapsedTime = Timer::stop();

        return $result;
    }
857231
public function cancel()
    {
        if ($this->isRealized) {
            return false;
        }

        $success = $this->isRealized = true;
        foreach ($this->waitQueue as $response) {
            if (!$response->cancel()) {
                $success = false;
            }
        }

        return $success;
    }
878405
protected function proceedingAllowed(): bool
    {
        if ($this->input->getOption('no-interaction')) {
            return true;
        }

        return $this->getHelper('question')->ask($this->input, $this->output, new ConfirmationQuestion('<question>Are you sure you wish to flush the whole database? (y/n)</question>', false));
    }
625654
public function rollbackTransaction() {
		$request = new CPS_RollbackTransactionRequest();
		$this->_lastResponse = $this->_connection->sendRequest($request);
		return true;
	}
800419
public function rateLimitReached()
    {
        if ($this->isIpWhitelisted()) {
            return false; // we cannot block whitelisted IPs
        }

        if ($this->isIpBlacklisted()) {
            return true;
        }

        $rateLimit = $this->config->get('BlockThreshold', 0);
        if ($rateLimit < 1) {
            return false; // rate limit not used
        }

        // get the last record that's on the end of the rate limit window
        $rc = LoginRateControlEntity::find(['ip' => $this->ip], ['-timestamp'], 1, $rateLimit);
        if (!$rc) {
            return false;
        }

        $blockTtl = $this->config->get('BlockTimelimit', 1) * 60; // defined in minutes, cast to seconds
        if ((time() - $blockTtl) > 60) {
            return false;
        }

        return true;
    }
882365
public function isExpired()
    {
        if (isset($this->_claims['exp']) && is_numeric($this->_claims['exp']))
        {
            $now  = new DateTime('now');
            return ($now->format('U') - $this->_claims['exp']) > 0;
        }

        return false;
    }
388604
public function flushExpired()
    {
        $this->Logger->debug('Flush all expired called.');

        try {
            foreach ( new DirectoryIterator($this->dir) as $item ) {
                $filename = $item->getPath() .DIRECTORY_SEPARATOR.$item->getFilename();
                $pathinfo = pathinfo($filename);

                // Find all files ending with .cfcache and destroy them if expired!
                if ($pathinfo['extension'] == $this->fileExtension)
                    $data = $this->readFile($filename);
                    if ($this->isExpired(null, $data))
                        unlink($filename);
            }
        } catch (Exception $e) {
            $this->Logger->error("flushExpired error: " . $e->getMessage());
            return false;
        }

        return true;
    }
960160
public function isExpired()
    {
        if (null === $this->expiresAt) {
            return false;
        }

        $now = new \DateTime();

        return $this->expiresAt < $now;
    }