Test if Customer meets conditions

@return bool
353821
public function isMatching()
    {
        $condition1 = $this->conditionValidator->variableOpComparison(
            $this->facade->getCartTotalTaxPrice(),
            $this->operators[self::CART_TOTAL],
            $this->values[self::CART_TOTAL]
        );

        if ($condition1) {
            $condition2 = $this->conditionValidator->variableOpComparison(
                $this->facade->getCheckoutCurrency(),
                $this->operators[self::CART_CURRENCY],
                $this->values[self::CART_CURRENCY]
            );

            if ($condition2) {
                return true;
            }
        }

        return false;
    }
548252
public function isValidShopProduct($defaultCurrency)
    {
        $isValid = false;

        if (method_exists($this, 'getPrices') &&
            $this->getStatus()->getId() == Status::ACTIVE &&
            $this->getPrices() &&
            count($this->getPrices()) > 0 &&
            $this->hasPriceInDefaultCurrency($this->getPrices(), $defaultCurrency) &&
            $this->getSupplier()
        ) {
            $isValid = true;
        }

        return $isValid;
    }
259149
final public function isConfigured()
	{
		$jname = $this->getJname();
		$result = false;

		if (!empty($jname)) {
			if (!isset(static::$status[$jname])) {
				$db = Factory::getDBO();
				$query = $db->getQuery(true)
					->select('status')
					->from('#__jfusion')
					->where('name = ' . $db->quote($jname));

				$db->setQuery($query);
				$result = $db->loadResult();
				if ($result >= 1) {
					$result = true;
				} else {
					$result = false;
				}
				static::$status[$jname] = $result;
			} else {
				$result = static::$status[$jname];
			}
		}
		return $result;
	}
665777
public function isValid()
    {
        //validate directPayment values
        $checkEmpty = array($this->ipAddress, $this->acct, $this->firstName, $this->lastName);

        if(!$this->checkEmpty($checkEmpty) || is_null($this->_address)) {
            return false;
        }

        //address fields
        $address = $this->_address;

        $test = array(
            $address->getStreet(),
            $address->getCity(),
            $address->getState(),
            $address->getCountryCode(),
            $address->getZip()
        );

        if(!$this->checkEmpty($test) || is_null($this->_paymentDetails)) {
            return false;
        }

        $amt = $this->_paymentDetails->getAmt();
        if(empty($amt)) {
            return false;
        }

        //payment details payment action cannot be order
        if($this->_paymentDetails->getPaymentAction() == "Order") {
            return false;
        }

        return true;
    }
1223398
public function validate()
    {
        if ($this->_amount === null) {
            $this->setValidationError('Payment amount not specified');
            return false;
        }

        $value = $this->_amount->getValue();
        if (empty($value) || $value <= 0.0) {
            $this->setValidationError('Invalid payment amount value: '.$value);
            return false;
        }

        if ($this->_receipt !== null && $this->_receipt->notEmpty()) {
            $email = $this->_receipt->getEmail();
            $phone = $this->_receipt->getPhone();
            if (empty($email) && empty($phone)) {
                $this->setValidationError('Both email and phone values are empty in receipt');
                return false;
            }
        }

        return true;
    }
1045538
public function isSuccessful(): bool
    {
        $failures = $this->getTotalFailures();
        $errors = $this->getTotalErrors();

        return $failures === 0 && $errors === 0;
    }
112403
public function has()
    {
        $table      = $this->query->getTable();
        $model      = basename(str_replace('\\', '/', get_class($this->parent)));
        $relation   = basename(str_replace('\\', '/', $this->model));
        $localKey   = $this->localKey;
        $foreignKey = $this->foreignKey;

        return $this->parent->db()
            ->alias($model)
            ->whereExists(function ($query) use ($table, $model, $relation, $localKey, $foreignKey) {
                $query->table([$table => $relation])
                    ->field($relation . '.' . $foreignKey)
                    ->whereExp($model . '.' . $localKey, '=' . $relation . '.' . $foreignKey);
            });
    }
547982
public function has()
    {
        if (!Request::has('position')) {
            return false;
        }

        if (isset($this->item->position)) {
            return true;
        }

        if (!empty($this->pivot) && isset($this->pivot->position)) {
            return true;
        }

        return false;
    }
741277
public function check(): bool
    {
        try {
            DB::connection()->getPdo();
        } catch (PDOException $e) {
            $this->error = $e->getMessage();

            return false;
        }

        return true;
    }
313354
public static function check()
    {
        if (Session::exists(static::resource('session'))) {
            return true;
        } elseif (Cookie::existe(static::resource('cookie'))) {
            $token = Cookie::get(static::resource('cookie'));

            $result = Query::from(config('auth.table'))
                ->where('rememberToken', '=', $token)
                ->get();

            if (count($result) > 0) {
                return true;
            }

            return false;
        }

        return false;
    }
237428
public function matches(array $conditions, ServerRequestInterface $request)
    {
        foreach ($conditions as $condition) {
            $inputSourceData = $this->getInputSource($condition);
            $matcherData = $this->getMatcher($condition);

            $inputValue = $inputSourceData->getInstance()->getValue(
                $request,
                $inputSourceData->getArgument()
            );

            if ($matcherData->getInstance()->match($inputValue, $matcherData->getArgument())) {
                return true;
            }
        }

        return false;
    }
879608
public function exists()
    {
        $quotedTable = \Database\DatabaseConnectionFactory::get()->quote($this->getTable());
        $record = \Database\DatabaseConnectionFactory::get()->query("show tables like {$quotedTable}");
        return !is_a($record, 'Database\DatabaseRecord\EmptyDatabaseRecord') && count($record->all()) > 0;
    }
618314
protected function checkUserGroup()
    {
        $isValid = true;

        $payPalPayment = $this->getPayment();
        $groups = $payPalPayment->getGroups();

        if ($groups && $groups->count() > 0) {
            $isValid = $this->isUserAssignedToGroup($groups);
        }

        return $isValid;
    }
1161326
protected function performCheck()
    {
        $relations = $this->determineRelations();

        if ( ! count($relations)) {
            return true;
        }

        foreach ($relations as $relation) {

            if ($this->model->{$relation}()->count()) {
                return false;
            }
        }

        return true;
    }
92222
public function isMet()
    {
        if ($this->isDisabled()) {
            return $this->getReturnValueIfIsDisabled();
        } else {
            if ($this->conditions->count() == 0) {
                throw new RuntimeException(
                    'No condition set in this requirement.'
                );
            }

            foreach ($this->conditions as $condition) {
                if (!$condition->isMet()) {
                    return false;
                }
            }

            return true;
        }
    }
1216936
public function isValid()
  {
    return ($this->checkUser() && $this->checkPass() && $this->checkHost() && $this->checkPort() && $this->checkPath() && $this->checkQuery() && $this->checkFragment());
  }
975337
public function isSuccessful()
    {
        if (isset($this->data['object']) && 'transaction' === $this->data['object']) {
            return !($this->data['status'] == 'refused');
        }
        return !isset($this->data['errors']);
    }