Uses positive check instance for validating match

@param string $name
@param mixed $subject
@param array $arguments

@return bool
@throws FailureException
7437
public function positiveMatch($name, $subject, array $arguments)
    {
        return $this->validateCheckerConditionsAndThrowFailureExceptionOnFailedCheck(
            $this->positiveCheck,
            $arguments,
            $this->positiveError
        );
    }
933289
protected function isMetadataMethod(string &$subject, int $key, string $pattern)
    {
        unset($key);
        if (!preg_match($pattern, $subject)) {
            $subject = false;
        }

        return;
    }
431773
protected function _success(Subject $subject)
    {
        $subject->set(['success' => true, 'created' => true]);

        $this->_trigger('afterRegister', $subject);
        $this->setFlash('success', $subject);

        $redirectUrl = $this->config('redirectUrl');
        if ($redirectUrl === null && $this->_controller()->components()->has('Auth')) {
            $redirectUrl = $this->_controller()->Auth->config('loginAction');
        }

        return $this->_redirect($subject, $redirectUrl);
    }
354474
public function validate($subject): bool
    {
        $validatedCount = 0;
        foreach ($this->schema['oneOf'] as $schema) {
            $nodeValidator = new NodeValidator($schema, $this->rootSchema);
            if ($nodeValidator->validate($subject)) {
                $validatedCount++;
            }
        }
        return $validatedCount === 1;
    }
522012
protected function isSubjectSupported($subject)
    {
        if (null === $subject || \is_string($subject) || $subject instanceof FieldVote || \is_object($subject)) {
            return true;
        }

        return \is_array($subject)
            && isset($subject[0], $subject[1])

            && (\is_string($subject[0]) || \is_object($subject[0]))
            && \is_string($subject[1]);
    }
736647
public function validate($subject): bool
    {
        $nodeValidator = new NodeValidator($this->rootSchema, $this->rootSchema);
        return $nodeValidator->validate($subject);
    }
234116
public static function for(string $pattern, string $subject)
    {
        $matches = [];

        try {
            $result = preg_match($pattern, $subject, $matches);
        } catch (Exception $exception) {
            throw RegexFailed::match($pattern, $subject, $exception->getMessage());
        }

        if ($result === false) {
            throw RegexFailed::match($pattern, $subject, static::lastPregError());
        }

        return new static($pattern, $subject, $result, $matches);
    }
261014
public static int preg_match(Pattern pattern, String subject) {
        int matches=0;
        Matcher m = pattern.matcher(subject);
        while(m.find()){ 
            ++matches;
        }
        return matches;
    }
1216500
protected function getNegativeFailureException($name, $subject, array $arguments)
    {
        return new FailureException(sprintf(
            'Expected %s not to be %s, but it is.',
            $this->presenter->presentString($this->cleanPath($subject->getCurrentUrl())),
            $this->presenter->presentString($this->cleanPath($arguments[0]))
        ));
    }
816536
protected function getFailureException($name, $subject, array $arguments)
    {
        return new FailureException(sprintf(
            'Expected session to have status code %s, but it is %s.',
            $this->presenter->presentValue($subject->getCurrentUrl()),
            $this->presenter->presentValue($arguments[0])
        ));
    }
90718
public function validate($subject): bool
    {
        foreach ($this->validatorMap as $validatorName => $validatorClass) {
            if (\array_key_exists($validatorName, $this->schema)) {
                /**
                 * @var ValidatorInterface $typeValidator
                 */
                $typeValidator = new $validatorClass($this->schema, $this->rootSchema);
                if (!$typeValidator->validate($subject)) {
                    return false;
                }
            }
        }
        return true;
    }
50679
public function execute(string $name, ...$arguments): bool
    {

        $method = AssuranceMethod::make($this->object, $name);

        $callable = $method->getCallable();
        $expected = $method->getExpected();

        $response = call_user_func($callable, ...$arguments);

        return $expected === $response;
    }
32312
public function match(Subject $subject, string $verb): bool
    {
        return $this->subject->getType() == $subject->getType() &&
            $this->subject->getId() === $subject->getId() &&
            ($this->verbs === null || in_array($verb, $this->verbs, true));
    }
1366445
public function negativeMatch(string $name, $subject, array $arguments): ?\PhpSpec\Wrapper\DelayedCall
    {
        if ($subject->equals($arguments[0])) {
            throw new FailureException('<label>' . get_class($subject) . "</label> <value>{$subject->toString()}</value> should not equal <value>{$arguments[0]->toString()}</value> but does.");
        }
    }
439493
public function ascii($subject) : bool
    {
        if ($subject === null) {
            return false;
        }
        $v = '' . $subject;
        return $v === '' ? true : !!preg_match('/^[[:ascii:]]+$/', $v);
    }
376527
public static <S> boolean the(S subject, Matcher<? super S> criteria) {
        return criteria.matches(subject);
    }
571917
public function validate($subject): bool
    {
        if (\is_array($this->schema['properties'])) {
            foreach ($this->schema['properties'] as $propertyName => $propertySchema) {
                if (isset($subject[$propertyName])) {
                    $nodeValidator = new NodeValidator($propertySchema, $this->rootSchema);
                    if (!$nodeValidator->validate($subject[$propertyName])) {
                        return false;
                    }
                }
            }
        }
        return true;
    }