diff --git a/psalm-baseline.xml b/psalm-baseline.xml index fce90ef9..68e315c6 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + Json @@ -21,13 +21,12 @@ $data - + $anyOfSchema $item $item $itemSchema $oneOfSchema - $schema->properties $value $value diff --git a/src/SchemaNormalizer.php b/src/SchemaNormalizer.php index dbf22a24..fef7da24 100644 --- a/src/SchemaNormalizer.php +++ b/src/SchemaNormalizer.php @@ -177,7 +177,10 @@ private function normalizeObject( /** * @see https://json-schema.org/understanding-json-schema/reference/object.html#properties */ - if (\property_exists($schema, 'properties')) { + if ( + \property_exists($schema, 'properties') + && \is_object($schema->properties) + ) { /** @var array $objectPropertiesThatAreDefinedBySchema */ $objectPropertiesThatAreDefinedBySchema = \array_intersect_key( \get_object_vars($schema->properties),