protected function validateSchema(&$document_data, &$data, array $data_pointer, array $parent_data_pointer, ISchema $document, $schema, ValidationResult $bag): bool
    {
        if (is_bool($schema)) {
            if ($schema) {
                return true;
            }
            $bag->addError(new ValidationError($data, $data_pointer, $parent_data_pointer, $schema, '$schema', [
                'schema' => $schema
            ]));
            return false;
        }

        if (!is_object($schema)) {
            throw new InvalidSchemaException($schema);
        }

        if (property_exists($schema, '$ref') && is_string($schema->{'$ref'})) {
            return $this->validateRef($document_data, $data, $data_pointer, $parent_data_pointer, $document, $schema, $bag);
        }

        return $this->validateKeywords($document_data, $data, $data_pointer, $parent_data_pointer, $document, $schema, $bag);
    }
protected function validateSchema(&$document_data, &$data, array $data_pointer, array $parent_data_pointer, ISchema $document, $schema, ValidationResult $bag): bool
    {
        if (is_bool($schema)) {
            if ($schema) {
                return true;
            }
            $bag->addError(new ValidationError($data, $data_pointer, $parent_data_pointer, $schema, '$schema', [
                'schema' => $schema
            ]));
            return false;
        }

        if (!is_object($schema)) {
            throw new InvalidSchemaException($schema);
        }

        if (property_exists($schema, '$ref') && is_string($schema->{'$ref'})) {
            return $this->validateRef($document_data, $data, $data_pointer, $parent_data_pointer, $document, $schema, $bag);
        }

        return $this->validateKeywords($document_data, $data, $data_pointer, $parent_data_pointer, $document, $schema, $bag);
    }
protected function validateSchema ( & $ document_data , & $ data , array $ data_pointer , array $ parent_data_pointer , ISchema $ document , $ schema , ValidationResult $ bag ) : bool { if ( is_bool ( $ schema ) ) { if ( $ schema ) { return true ; } $ bag -> addError ( new ValidationError ( $ data , $ data_pointer , $ parent_data_pointer , $ schema , '$schema' , [ 'schema' => $ schema ] ) ) ; return false ; } if ( ! is_object ( $ schema ) ) { throw new InvalidSchemaException ( $ schema ) ; } if ( property_exists ( $ schema , '$ref' ) && is_string ( $ schema -> { '$ref' } ) ) { return $ this -> validateRef ( $ document_data , $ data , $ data_pointer , $ parent_data_pointer , $ document , $ schema , $ bag ) ; } return $ this -> validateKeywords ( $ document_data , $ data , $ data_pointer , $ parent_data_pointer , $ document , $ schema , $ bag ) ; }
Validates a schema
@param $document_data
@param $data
@param array $data_pointer
@param array $parent_data_pointer
@param ISchema $document
@param $schema
@param ValidationResult $bag
@return bool
Validates a schema