Skip to content

Commit 2a00b0b

Browse files
committed
fix stan
1 parent 1e2b728 commit 2a00b0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Registry/SchemaRegistry.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ private function registerSchemaFile(\SplFileInfo $fileInfo): void
135135
}
136136

137137
$schemaData = json_decode($fileContent, true, JSON_THROW_ON_ERROR);
138-
$namespace = $schemaData['namespace'] ?? '';
138+
$namespace = (string) $schemaData['namespace'];
139139

140140
if (null === $schemaData) {
141141
throw new SchemaRegistryException(sprintf(SchemaRegistryException::FILE_INVALID, $fileName));
@@ -150,7 +150,7 @@ private function registerSchemaFile(\SplFileInfo $fileInfo): void
150150
$this->schemas[$schemaId] = $template->withSchemaId($schemaId);
151151

152152
if (true === isset($schemaData['name'])) {
153-
$this->schemaNamesPerNamespace[$namespace][] = $schemaData['name'];
153+
$this->schemaNamesPerNamespace[$namespace][] = (string) $schemaData['name'];
154154
}
155155
}
156156

0 commit comments

Comments
 (0)