Checks if the the consumer is still in a valid state to continue.

@return bool
514708
public function valid()
    {
        $isValid = $this->isFlagSet(self::STATUS_VALID);
        $subscriptionFlags = self::STATUS_SUBSCRIBED | self::STATUS_PSUBSCRIBED;
        $hasSubscriptions = ($this->statusFlags & $subscriptionFlags) > 0;

        return $isValid && $hasSubscriptions;
    }
414324
public function is_valid() {
        $ret = false;

        if (is_null($this->deleteInsteadOfAppend) === false && is_null($this->subscriberIds) === false &&
            is_null($this->emails) === false
        ) {
            $ret = true;
        }

        return $ret;
    }
567102
public function valid()
    {
        if ($this->_currentPage == 0 || $this->_index % $this->_pageSize == 0 && $this->_index < $this->_totalItems)
        {
            $this->_getNextPage();
        }

        return $this->_index < $this->_totalItems;
    }
1266758
public function valid()
    {
        $key = isset($this->items[$this->pos]) ? $this->items[$this->pos] : null;
        return ($key !== null && $key !== false);
    }
281419
public function isArticleValid()
    {
        $valid = true;
        if ($this->isArticleAmountZero() || $this->isSameItemInBasket()) {
            $valid = false;
        }

        return $valid;
    }
1200719
protected function hasInvalidState()
    {
        if ($this->isStateless()) {
            return false;
        }

        $state = $this->request->getSession()->pull('state');

        return !(strlen($state) > 0 && $this->request->input('state') === $state);
    }
1085664
public function valid()
    {
        if (key($this->_data) === null) {
            return false;
        }

        $current = current($this->_data);
        while (!$current->value()) {
            $current = $this->next();
            if (key($this->_data) === null) {
                return false;
            }
        }
        return true;
    }
805602
public function IsAvailable()
    {
        $bIsValid = true;
        $bIsValid = ($bIsValid && $this->IsActive());
        if (!$bIsValid) {
            return $bIsValid;
        }
        $oPaymentHandler = $this->GetFieldShopPaymentHandler();
        $bIsValid = ($bIsValid && !is_null($oPaymentHandler) && $oPaymentHandler->AllowUse($this));
        $bIsValid = ($bIsValid && $this->IsValidForCurrentUser());
        $bIsValid = ($bIsValid && $this->IsValidForBasket());

        return $bIsValid;
    }
229880
public function isExpired()
    {
        if (is_null($this->valid_until)) {
            return false;
        }

        return Carbon::now()->gt($this->valid_until) or Carbon::now()->eq($this->valid_until);
    }
454017
public function isActive() {
        if (!$this->getValue(
                self::KEY_ACTIVE,
                $this->storeManager->getStore()
            )) {
            return false;
        }

        $quote = $this->checkoutSession->getQuote();

        return (bool) in_array($quote->getQuoteCurrencyCode(), $this->getAcceptedCurrencies());
    }
1274016
public function persist(): bool
    {
        $success = true;
        foreach ($this->values as $key => $value) {
            $success &= $this->writeOption($key, $value);
        }

        return $success;
    }
473874
public function isSuccessful()
    {
        if (!$this->testMdSignatures()) {
            return false;
        }

        return in_array($this->getStatus(), [self::STATUS_PENDING, self::STATUS_PROCESSED]);
    }
651581
public function persist(): bool
    {
        $success = true;
        foreach ($this->repositories as $repository) {
            $success &= $repository->persist();
        }

        return $success;
    }
1094033
public function valid()
    {
        if (!parent::valid()) {
            return false;
        }

        $current = $this->current();
        $key = $this->key();
        $condition = $this->_condition;

        return !$condition($current, $key, $this->_innerIterator);
    }
1336814
public function isPending()
    {
        $status = $this->getStatus();
        return $status === self::STATUS_PROVISIONING || $status === self::STATUS_REQUESTED;
    }
1211128
public function IsAvailable()
    {
        $bIsValid = true;
        $bIsValid = ($bIsValid && $this->IsActive());
        $bIsValid = ($bIsValid && $this->isValidForCurrentPortal());
        $bIsValid = ($bIsValid && $this->IsValidForCurrentUser());
        $bIsValid = ($bIsValid && $this->IsValidForBasket());

        return $bIsValid;
    }
62221
public function isFreed(): bool
    {
        // If we are no longer connected to the memory segment, check if it has
        // been invalidated.
        if ($this->handle !== null) {
            $this->handleMovedMemory();
            $header = $this->getHeader();
            return $header['state'] === static::STATE_FREED;
        }

        return true;
    }