Yields the validatable claims

@return array
506058
private function getValidatableClaims()
    {
        $claims = array();

        foreach ($this->claims as $claim) {
            if ($claim instanceof Validatable) {
                $cliams[] = $claim;
            }
        }

        return $claims;
    }
147566
public function yield(): Generator
	{
		foreach($this->fetchYield(PDO::FETCH_ASSOC) as $row)
		{
			yield $this->hydrateModel($row);
		}
	}
633111
protected function _getLdapFieldsValidationRules() {
		$result = [];
		$ldapFields = $this->_modelConfigSync->getLdapFieldsInfo();
		if (empty($ldapFields)) {
			return $result;
		}

		$localFields = $this->getListLocalFields();
		if (empty($localFields)) {
			return $result;
		}

		foreach ($ldapFields as $ldapFieldName => $ldapFieldInfo) {
			if (!isset($ldapFieldInfo['rules']) || empty($ldapFieldInfo['rules'])) {
				continue;
			}

			if (!in_array($ldapFieldName, $localFields)) {
				continue;
			}

			$result[$ldapFieldName] = $ldapFieldInfo['rules'];
		}

		return $result;
	}
239293
public function makeValid(): array {
        if ($this->isValid()) {
            return array($this);
        }

        $ret = array();
        foreach ($this->resources as $uri => $res) {
            $tmp            = clone($this);
            $tmp->uri       = '';
            $tmp->resources = array($uri => $res);
            $tmp->classes   = array();
            $ret[]          = $tmp;
        }
        foreach ($this->classes as $class) {
            $tmp            = clone($this);
            $tmp->uri       = '';
            $tmp->resources = array();
            $tmp->classes   = array($class => $class);
            $ret[]          = $tmp;
        }
        return $ret;
    }
1222545
public function validationRules():array
    {
        $rules = [];

        foreach ($this as $control) {
            $rule = $control->getRule();
            if (!empty($rule)) {
                $rules[$control->getName()] = $control->getRule();
            }
        }

        return $rules;
    }
1045208
private function getAttributeKeys(): \Generator
    {
        foreach ($this->handlers as $attributeHandler) {
            /** @var MetaModelAttributeHandlerInterface $attributeHandler */
            $prefix = $attributeHandler->getPrefix();
            foreach ($this->idListGenerator() as $id) {
                yield $id . '.' . $prefix;
            }
        }
    }
1192400
public function getInvalidErrors()
    {
        return array_combine(
            array_keys($this->invalidAttribs),
            array_map(function ($ref) {
                return $ref['error'];
            }, array_values($this->invalidAttribs))
        );
    }
605408
public function getInvocations(): array
    {
        if (empty($this->invocations)) {
            $this->locateInvocations($this->getTokens());
        }

        return $this->invocations;
    }
476291
public function getValidatorMessages()
    {
        $messages = [];
        
        foreach ($this->owner->getValidatorRules() as $rule) {
            
            if ($rule->hasMessage()) {
                $messages[$rule->getType()] = $rule->getMessage();
            }
            
        }
        
        return $messages;
    }
29854
public function attachments()
    {
        $attachableObjects = $this->attachableObjects();
        $attachments       = $this->obj()->getAttachments([
            'group' => $this->group()
        ]);

        foreach ($attachments as $attachment) {
            $GLOBALS['widget_template'] = (string)$attachment->rawPreview();

            if (isset($attachableObjects[$attachment->objType()])) {
                $attachment->attachmentType = $attachableObjects[$attachment->objType()];
            } else {
                continue;
            }

            yield $attachment;

            $GLOBALS['widget_template'] = '';
        }
    }
486631
public function checkRequirements(): array
    {
        $results = [];

        $this->checkVersion($results, 'php','php', $this->requires['php'], PHP_VERSION);
        $this->checkVersion($results, 'grav', 'grav', $this->requires['grav'], GRAV_VERSION);
        $this->checkPlugins($results, $this->requires['plugins']);

        return $results;
    }
1074674
public static function getValidatedFields()
    {
        $fields = [];

        foreach (static::getRulesGroups() as $groupName) {
            $fields = array_merge($fields, array_keys(static::getRulesGroup($groupName)));
        }

        return array_values(array_unique($fields));
    }
172253
public function flattenCases(): array
    {
        $dict = [];
        foreach ($this->getCases() as $case) {
            if (!isset($dict[$case->file])) {
                $dict[$case->file] = new TestSuite($case->class, 0, 0, 0, 0, 0, 0);
            }
            $dict[$case->file]->cases[] = $case;
            ++$dict[$case->file]->tests;
            $dict[$case->file]->assertions += $case->assertions;
            $dict[$case->file]->failures += \count($case->failures);
            $dict[$case->file]->errors += \count($case->errors);
            $dict[$case->file]->skipped += \count($case->skipped);
            $dict[$case->file]->time += $case->time;
            $dict[$case->file]->file = $case->file;
        }

        return array_values($dict);
    }
347972
protected function parseClaims(string $data): array
    {
        $claims = $this->decode($data);

        if (null === $claims) {
            throw new \UnexpectedValueException('Invalid claims encoding');
        }

        if (isset($claims[RegisteredClaims::AUDIENCE])) {
            $claims[RegisteredClaims::AUDIENCE] = (array) $claims[RegisteredClaims::AUDIENCE];
        }

        $time = $this->getTime();

        foreach (
            [
                // Check if the nbf if it is defined. This is the time that the
                // token can actually be used. If it's not yet that time, abort.
                RegisteredClaims::NOT_BEFORE,
                // Check that this token has been created before 'now'. This prevents
                // using tokens that have been created for later use (and haven't
                // correctly used the nbf claim).
                RegisteredClaims::ISSUED_AT,
            ] as $claim
        ) {
            if (!isset($claims[$claim])) {
                continue;
            }

            $claims[$claim] = $this->convertDate((string) $claims[$claim]);

            if ($claims[$claim] > $time) {
                throw new BeforeValidException(
                    'Cannot handle token prior to ' . $claims[$claim]->format(\DateTime::ATOM)
                );
            }
        }

        // Check if this token has expired.
        if (isset($claims[RegisteredClaims::EXPIRATION_TIME])) {
            $claims[RegisteredClaims::EXPIRATION_TIME] = $this->convertDate((string) $claims[RegisteredClaims::EXPIRATION_TIME]);

            if ($time >= $claims[RegisteredClaims::EXPIRATION_TIME]) {
                throw new ExpiredException('Expired token');
            }
        }

        foreach ([RegisteredClaims::ISSUER, RegisteredClaims::SUBJECT, RegisteredClaims::ID] as $claim) {
            if (isset($this->validation[$claim])) {
                if (!isset($claims[$claim]) || $claims[$claim] !== $this->validation[$claim]) {
                    throw new ClaimInvalidException("Invalid $claim");
                }
            }
        }

        if (isset($this->validation[RegisteredClaims::AUDIENCE])) {
            if (
                !isset($claims[RegisteredClaims::AUDIENCE]) ||
                [] === \array_intersect($this->validation[RegisteredClaims::AUDIENCE], $claims[RegisteredClaims::AUDIENCE])
            ) {
                throw new ClaimInvalidException('Invalid aud');
            }
        }

        return $this->claims = $claims;
    }
914515
public function getFlattenValidators()
    {
        if (!$this->exists) {
            return [];
        }

        $validators = $this->validators;
        $return     = [];
        if (!empty($validators)) {
            foreach ($validators as $validator) {
                $return[$validator->validator_id] = $validator->value;
            }
        }
        return $return;
    }
207021
protected function get_validate_rules() {
		$rules = [];

		foreach ( $this->fields as $key => $field ) {
			// TODO: Group field cannot validate at moment.
			if ( 'group' === $field->get_type() ) {
				continue;
			}

			if ( $rule = $field->get_option( 'validate' ) ) {
				$key           = $field->is_repeatable() ? $key . '.*' : $key;
				$rules[ $key ] = $rule;
			}
		}

		return $rules;
	}
280826
public function getAssetVariables()
    {
        $result = [];

        foreach ($this->getFormFields() as $attribute => $field) {
            if (!$varName = array_get($field, 'assetVar')) {
                continue;
            }

            $result[$varName] = $this->{$attribute};
        }

        return $result;
    }