{@inheritdoc}

@see PreconditionInterface::performCheck()
320481
public function performCheck()
    {
        $result = new PreconditionResult();
        if (!$this->functionInspector->functionAvailable('finfo_open')) {
            $result
                ->setState(PreconditionResult::STATE_FAILED)
                ->setMessage(t('You must enable the PHP Fileinfo extension.'))
            ;
        }

        return $result;
    }
1026546
public function performCheck()
    {
        try {
            $serverTimeZone = $this->installerOptions->getServerTimeZone(false);
            $ctz = $this->application->make(Timezone::class, ['connection' => $this->connection]);
            $deltaTimezone = $ctz->getDeltaTimezone($serverTimeZone);
            if ($deltaTimezone !== null) {
                $error = $ctz->describeDeltaTimezone($deltaTimezone);
                $suggestTimezones = $ctz->getCompatibleTimezones();
                if (!empty($suggestTimezones)) {
                    $error .= ' ' . t('These are the time zones compatible with the database one: %s', PunicMisc::join($suggestTimezones));
                }
                $result = new PreconditionResult(PreconditionResult::STATE_FAILED, $error);
            } else {
                $result = new PreconditionResult(PreconditionResult::STATE_PASSED);
            }
        } catch (Exception $x) {
            $result = new PreconditionResult(PreconditionResult::STATE_WARNING, $x->getMessage());
        }

        return $result;
    }
91085
public function check() {
		foreach ( $this->requirements as $requirement ) {
			// Match against config.
			$requirementFulfilled = $this->requirementIsFulfilled( $requirement );

			if ( $requirementFulfilled ) {
				continue;
			}

			$this->addMissingRequirementMessage( $requirement );
		}
	}
746894
private function emailCheck(CheckInterface $emailCheck, $checkMsg)
    {
        try {
            $emailCheck->performCheck();
            $this->logSuccessCheck($checkMsg, $emailCheck->getIndent(), self::CHECK_OK);
        } catch (Exception $exception) {
            $this->logFailCheck($checkMsg, $emailCheck->getIndent(), $exception->getMessage(), self::CHECK_FAIL);
            throw $exception;
        }
    }
122157
public function performCheck()
    {
        $result = null;
        $configuration = $this->installerOptions->getConfiguration();
        foreach ([
            'canonical-url' => t('The canonical URL must have the http:// scheme or the https:// scheme'),
            'canonical-url-alternative' => t('The alternative canonical URL must have the http:// scheme or the https:// scheme'),
        ] as $handle => $error) {
            if (isset($configuration[$handle]) && $configuration[$handle] !== '') {
                $originalUrl = $configuration[$handle];
                $url = UrlImmutable::createFromUrl($originalUrl);
                if (!preg_match('/^https?$/i', $url->getScheme())) {
                    $result = new PreconditionResult(PreconditionResult::STATE_FAILED, $error);
                    break;
                }
                $finalUrl = (string) $url;
                if ($originalUrl !== $finalUrl) {
                    $result = new PreconditionResult(PreconditionResult::STATE_FAILED, t('The canonical url "%1$s" should be specified as "%2$s"', $originalUrl, $finalUrl));
                }
            }
        }
        if ($result === null) {
            $result = new PreconditionResult(PreconditionResult::STATE_PASSED);
        }

        return $result;
    }
134439
public function checkResult(Pjb62\Exception\JavaException $result): void
    {
        $exception = $this->getExceptionFromResult($result);
        throw $exception;
    }
1066832
public function performCheck()
    {
        $this->emailCheck($this->getEmailSendCheck(), self::EMAIL_SEND_CHECK_MSG);
        $this->emailCheck($this->getEmailReceiveCheck(), self::EMAIL_RECEIVE_CHECK_MSG);
    }
840724
private function validateCheckerConditionsAndThrowFailureExceptionOnFailedCheck(
        CheckInterface $checker,
        array $arguments,
        $errorText
    ) {
        $validatorData = $checker($arguments);

        if ($validatorData !== true) {
            if (is_array($validatorData)) {
                throw new FailureException(sprintf($errorText, ...$validatorData));
            }

            throw new FailureException($errorText);
        }

        return true;
    }
577620
public function check()
    {
        IlluminateRedis::set(
            $key = $this->target->key,
            $number = random_bytes(80)
        );

        $result = IlluminateRedis::get($key);

        return $this->makeResult(
            $number == $result,
            $number !== $result ? $this->target->key : ''
        );
    }
24988
public function execute()
    {
        $to_compare_with = func_get_arg(0);
        $mode = func_num_args() == 1 ? '=' : func_get_arg(1);
        
        $modes = [
            '=',
            '>',
            '<',
            '>=',
            '<='
        ];
        
        if (! in_array($mode, $modes)) {
            Throw new ValidatorException(sprintf('Parameter "%s" not allowed', $mode), 1001);
        }
        
        switch ($mode) {
            case '=':
                $result = $this->value == $to_compare_with;
                break;
            
            case '>':
                $result = $this->value > $to_compare_with;
                break;
            
            case '<':
                $result = $this->value < $to_compare_with;
                break;
            
            case '>=':
                $result = $this->value >= $to_compare_with;
                break;
            
            case '<=':
                $result = $this->value <= $to_compare_with;
                break;
        }
        
        if (! $result) {
            $this->msg = [
                'validator.rule.compare',
                [
                    $this->value,
                    $to_compare_with,
                    $mode
                ]
            ];
        }
    }
1275749
public function verify(): bool
    {
        if (!$this->callback) {
            throw new \Exception('Callbacks need to exist to run verify.');
        }

        $pactJson = $this->reify();

        // call the function to actually run the logic
        try {
            \call_user_func($this->callback, $pactJson);

            return $this->writePact();
        } catch (\Exception $e) {
            return false;
        }
    }
84399
private function checkPreconditions(\Concrete\Core\Application\Application $app, OutputInterface $output)
    {
        $result = true;
        $service = $app->make(PreconditionService::class);
        /* @var PreconditionService $service */
        $requiredPreconditions = [];
        $optionalPreconditions = [];
        foreach ($service->getPreconditions(false) as $precondition) {
            if ($precondition->isOptional()) {
                $optionalPreconditions[] = $precondition;
            } else {
                $requiredPreconditions[] = $precondition;
            }
        }
        foreach ([
            'Checking required preconditions:' => $requiredPreconditions,
            'Checking optional preconditions:' => $optionalPreconditions,
        ] as $text => $preconditions) {
            if (empty($preconditions)) {
                continue;
            }
            if ($output->getVerbosity() >= OutputInterface::VERBOSITY_NORMAL) {
                $output->writeln($text);
            }
            foreach ($preconditions as $precondition) {
                if ($output->getVerbosity() >= OutputInterface::VERBOSITY_NORMAL) {
                    $output->write(sprintf('- %s... ', $precondition->getName()));
                } elseif ($precondition->isOptional()) {
                    continue;
                }
                $preconditionResult = $precondition->performCheck();
                switch ($preconditionResult->getState()) {
                    case PreconditionResult::STATE_PASSED:
                        if ($output->getVerbosity() >= OutputInterface::VERBOSITY_NORMAL) {
                            $message = $preconditionResult->getMessage();
                            $message = $message ? sprintf('passed (%s).', $message) : 'passed.';
                            $output->writeln(sprintf('<info>%s</info>', $message));
                        }
                        break;
                    case PreconditionResult::STATE_WARNING:
                        if ($output->getVerbosity() >= OutputInterface::VERBOSITY_NORMAL) {
                            $output->writeln(sprintf('<comment>%s</comment>', $preconditionResult->getMessage()));
                        }
                        break;
                    case PreconditionResult::STATE_SKIPPED:
                        if ($output->getVerbosity() >= OutputInterface::VERBOSITY_NORMAL) {
                            $output->writeln(sprintf('<comment>%s</comment>', $preconditionResult->getMessage() ?: 'skipped.'));
                        }
                        break;
                    case PreconditionResult::STATE_FAILED:
                    default:
                        if ($output->getVerbosity() >= OutputInterface::VERBOSITY_NORMAL) {
                            $output->writeln(sprintf('<error>%s</error>', $preconditionResult->getMessage()));
                        }
                        if (!$precondition->isOptional()) {
                            $result = false;
                        }
                        break;
                }
            }
        }

        return $result;
    }
458984
public function check()
	{
		$this->checked	= TRUE;
		$this->methods	= array();
		$matches		= array();
		$content		= FS_File_Reader::load( $this->fileName );
		if( preg_match( "@class @i", $content ) )
			if( preg_match_all( "@\tfunction (& *)?([a-z][a-z0-9]+)@i", $content, $matches ) )
				foreach( $matches[2] as $match )
					$this->methods[]	= $match;
		return empty( $this->methods );
	}
334785
public function check(
        StatementsSource $source,
        CodeLocation $code_location,
        array $suppressed_issues,
        array $phantom_classes = [],
        $inferred = true
    ) {
        if ($this->checked) {
            return;
        }

        $all_good = true;

        foreach ($this->types as $atomic_type) {
            if ($atomic_type->check(
                $source,
                $code_location,
                $suppressed_issues,
                $phantom_classes,
                $inferred
            ) === false) {
                $all_good = false;
            }
        }

        if (!$all_good) {
            return false;
        } else {
            $this->checked = true;
        }
    }
1271017
@Override
    protected Result check() throws Exception {

        m_repository.select(Context.DEFAULT_CONTEXT, new Resource("notreal"), Optional.of(Timestamp.fromEpochMillis(0)), Optional.of(Timestamp.fromEpochMillis(0)));

        return Result.healthy();
    }
817260
public function check()
    {
        try {
            try {
                $this->result(
                    $this->resource->checker->setTarget($this)->checkTarget(
                        $this
                    )
                );
            } catch (\Exception $exception) {
                report($exception);

                $this->exceptionResult($exception);
            }
        } catch (\Throwable $error) {
            report($error);

            $this->exceptionResult($error);
        }

        $this->moveChecksBackToTarget();

        return $this;
    }
91238
public function check()
    {
        $returnValue = null;

        
        $report = parent::check();
        $name = $this->getName();
        
        if ($report->getStatus() == common_configuration_Report::VALID){
            $report->setMessage("Database Driver '${name}' is available.");
        }
        else{
            $report->setMessage("Database Driver '${name}' could not be found or is unavailable.");
        }

        $returnValue = $report;
        

        return $returnValue;
    }