Is this feedback open (check timeopen and timeclose)
@return bool
168032
public function is_open() {
        $checktime = time();
        return (!$this->feedback->timeopen || $this->feedback->timeopen <= $checktime) &&
            (!$this->feedback->timeclose || $this->feedback->timeclose >= $checktime);
    }
1362919
public function isTimeNearlyUp(float $threshold = self::TIME_UP_THRESHOLD): bool
    {
        $max_execution_time = (int) ini_get('max_execution_time');

        // If there's no time limit, then we can't run out of time.
        if ($max_execution_time === 0) {
            return false;
        }

        $now = microtime(true);

        return $now + $threshold > $this->start_time + (float) $max_execution_time;
    }
932834
public function check(): bool
  {
    if ( $this->current !== null ){
      // if $on_error is set to E_CONTINUE returns true
      if ( $this->on_error === self::E_CONTINUE ){
        return true;
      }
      // If any connection has an error with mode E_STOP_ALL
      if ( self::$has_error_all && ($this->on_error !== self::E_STOP_ALL) ){
        return false;
      }
      // If this connection has an error with mode E_STOP
      if ( $this->has_error && ($this->on_error !== self::E_STOP) ){
        return false;
      }
      return true;
    }
    return false;
  }
511902
def is_open(self, refresh=False):
        
        if refresh:
            self.refresh()
        return self.get_level(refresh) > 0
1100110
function open() {
        // let's try to open a socket
        $this->_error_log('open a socket connection');
        $this->sock = fsockopen($this->_socket . $this->_server, $this->_port, $this->_errno, $this->_errstr, $this->_socket_timeout);
        core_php_time_limit::raise(30);
        if (is_resource($this->sock)) {
            socket_set_blocking($this->sock, true);
            $this->_connection_closed = false;
            $this->_error_log('socket is open: ' . $this->sock);
            return true;
        } else {
            $this->_error_log("$this->_errstr ($this->_errno)\n");
            return false;
        }
    }
1199077
protected function checkTime()
    {
        $result = false;

        $lastExecution = $this->getExecutionTime();
        $interval = $this->getInterval();
        $anonymous = \common_session_SessionManager::isAnonymous();

        if ($lastExecution === null && !$anonymous) {
            $result = true;
        } elseif($lastExecution !== null && $interval !== null && !$anonymous) {
            $mustBeExecutedAt = clone($lastExecution);
            $mustBeExecutedAt->add($interval);
            $now = new DateTime('now');
            $result = ($mustBeExecutedAt < $now);
        }

        return $result;
    }
192196
public function isDie() {
        if ($this->_time > 0) {
            $die = false;

            if (!file_exists($this->_fileName)) {
                $die = true;
            }
            else {
                $timeAgo = time() - filemtime($this->_fileName);
                if ($timeAgo > $this->_time) {
                    $die = true;
                }
            }

            return $die;
        }
        else {
            return true;
        }
    }
238152
public function expired()
    {
        // Update if empty
        if (empty($this->entries)) {
            return true;
        }

        // Check timestamps
        if ($this->timestampManager) {
            return $this->timestampManager->check($this->getTimestamp());
        }

        return false;
    }
1168927
public function isOpen()
    {
        if ($this->stateStorage->isCircuitOpen($this->commandKey)) {
            // if we're open we immediately return true and don't bother attempting to 'close' ourself
            // as that is left to allowSingleTest and a subsequent successful test to close
            return true;
        }

        $healthCounts = $this->metrics->getHealthCounts();
        if ($healthCounts->getTotal() < $this->config->get('circuitBreaker')->get('requestVolumeThreshold')) {
            // we are not past the minimum volume threshold for the statistical window
            // so we'll return false immediately and not calculate anything
            return false;
        }

        $allowedErrorPercentage = $this->config->get('circuitBreaker')->get('errorThresholdPercentage');
        if ($healthCounts->getErrorPercentage() < $allowedErrorPercentage) {
            return false;
        } else {
            $this->stateStorage->openCircuit(
                $this->commandKey,
                $this->config->get('circuitBreaker')->get('sleepWindowInMilliseconds')
            );
            return true;
        }
    }
191308
public function isValid()
    {
        $payload = $this->getPayload();
        if (!isset($payload['exp'])) {
            return false;
        }

        $expireDateTime = DateTimeImmutable::createFromFormat('U', $payload['exp']);
        $now = new DateTime('now');
        return ($expireDateTime->getTimestamp() - $now->getTimestamp()) > 0;
    }
749104
public function isLocked()
    {
        if ($this->getFailuresNum() == \Dotdigitalgroup\Email\Model\FailedAuth::NUMBER_MAX_FAILS_LIMIT &&
            strtotime($this->getLastAttemptDate() . '+5 min') > time()) {
            return true;
        }

        return false;
    }
147020
public function confirm()
    {
        $this->trigger(self::BEFORE_CONFIRM);
        $result = (bool) $this->updateAttributes(['confirmed_at' => time()]);
        $this->trigger(self::AFTER_CONFIRM);
        return $result;
    }
401547
public function isClosed()
    {
        $validFails = 0;
        $now = time();
        $cooldownBound = $now - $this->cooldown;
        foreach ($this->failures as $i => $time) {
            if ($time >= $cooldownBound) {
                $validFails ++;
            }
        }
        return $validFails < $this->threshold;
    }
522532
public function isOpen() {
		if (empty($this->close_date)) {
			// There is no closing date so this poll is always open
			return true;
		}

		$now = time();

		// input/date saves beginning of day and we want to include closing date day in poll
		$deadline = $this->close_date + 86400;

		return $deadline > $now;
	}
1226677
public function isPublished(DateTime $time = null)
    {
        $timestamp = $time ? $time->getTimestamp() : time();

        return $this->{self::ATTR_EMBARGOED_UNTIL} && $this->{self::ATTR_EMBARGOED_UNTIL} <= $timestamp;
    }
540930
public function check_locktime() {
        if (!empty($this->locked)) {
            return; // already locked
        }

        if ($this->locktime and $this->locktime < time()) {
            $this->locked = time();
            $this->update('locktime');
        }
    }
1125768
protected function check()
  {
    if ( $this->slugAble() ){
      if ( !$this->checkTitleUnique($this->row->get('id'), $this->row->get('title')) ){
        return false;
      }
      
      if ( !$this->checkSlugUnique($this->row->get('id'), $this->row->get('slug')) ){
        return false;
      }
    }
    
    if ( $this->orderingAble() ){
      if ( $this->shouldBeOrdered() ){
        $conditions = $this->getReorderConditions();
        $this->row->set('ordering', $this->getNextOrder($conditions));
      }
    }
    
    if ( $this->statesAble() ){
      $userId   = $this->db->getUid();
      $nullDate = $this->db->getNullDate();
      $nowDate  = Date::getInstance()->format($this->db->getDateFormat());
      
      if ( !$this->row->get($this->tbl_key) ){
        $this->row->set('created', $nowDate);
        $this->row->set('created_by', $userId); 
      }
      else {
        $this->row->set('modified', $nowDate);
        $this->row->set('modified_by', $userId); 
      }
    }
    
    if ( $this->versionAble() ){
      $version = (int)$this->row->get('version');
      $this->row->set('version', ++$version);
    }
    
    foreach($this->getFields() as $fieldName => $fieldInfos){
      $v = $this->row->get($fieldName);
      
      if ( 'YES' === $fieldInfos->Null ){
        switch($fieldInfos->Type){
          case 'bigint':
          case 'mediumint':
          case 'smallint':
          case 'tinyint':
            if ( 0 === $this->row->get($fieldName) ){
              $this->row->set($fieldName, null);
            }
            break;
          
          case 'datetime':
          case 'timestamp':
            if ( $this->db->getNullDate(true) === $this->row->get($fieldName) ){
              $this->row->set($fieldName, null);
            }
            break;
          
          case 'date':
            if ( $this->db->getNullDate(false) === $this->row->get($fieldName) ){
              $this->row->set($fieldName, null);
            }
            break;
          
          case 'time':
            if ( '00:00:00' === $this->row->get($fieldName) ){
              $this->row->set($fieldName, null);
            }
            break;
        }
      }
    }
    
    return true;
  }