Skip to content

Commit

Permalink
fix warning (#59)
Browse files Browse the repository at this point in the history
* fix warning

* allow infection plugin
  • Loading branch information
nick-zh authored Oct 28, 2022
1 parent 1111c9a commit e272c9d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,10 @@
"branch-alias": {
"dev-main": "3.0-dev"
}
},
"config": {
"allow-plugins": {
"infection/extension-installer": true
}
}
}
6 changes: 5 additions & 1 deletion src/Registry/SchemaRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ private function registerSchemaFile(\SplFileInfo $fileInfo): void
}

$schemaData = json_decode($fileContent, true, JSON_THROW_ON_ERROR);
$namespace = $schemaData['namespace'] ?? '';
$namespace = '';

if (true === isset($schemaData['namespace'])) {
$namespace = $schemaData['namespace'];
}

if (null === $schemaData) {
throw new SchemaRegistryException(sprintf(SchemaRegistryException::FILE_INVALID, $fileName));
Expand Down

0 comments on commit e272c9d

Please sign in to comment.