diff --git a/src/CompileVisitor.php b/src/CompileVisitor.php index 7c1612e..be04ad2 100644 --- a/src/CompileVisitor.php +++ b/src/CompileVisitor.php @@ -70,7 +70,7 @@ public function visitInstance($value): string return 'return null;'; } - assert(! is_object($value), 'Invalid instance type:' . gettype($value)); + assert(is_object($value), 'Invalid instance type:' . gettype($value)); return sprintf('return unserialize(\'%s\');', serialize($value)); } diff --git a/src/InstallBuiltinModule.php b/src/InstallBuiltinModule.php index 9c711bb..caf08cb 100644 --- a/src/InstallBuiltinModule.php +++ b/src/InstallBuiltinModule.php @@ -20,6 +20,7 @@ public function __invoke(AbstractModule $module): AbstractModule $module->install(new PramReaderModule()); $hasMultiBindings = count($module->getContainer()->multiBindings); if ($hasMultiBindings) { + // Apply MapModule if multiple bindings are present $module->override(new MapModule()); }