Skip to content

Commit

Permalink
refactor(ServiceProvider): Improve SoarServiceProvider
Browse files Browse the repository at this point in the history
- Configure 'soar' in the application
- Bind ConnectionInterface to Container
- Update connection retrieval in SoarServiceProvider
  • Loading branch information
guanguans committed Jul 14, 2023
1 parent 78e96bc commit 90d8390
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,4 @@
<code>$scores</code>
</InvalidArgument>
</file>
<file src="src/SoarServiceProvider.php">
<UndefinedInterfaceMethod>
<code>$container</code>
</UndefinedInterfaceMethod>
</file>
</files>
2 changes: 1 addition & 1 deletion src/SoarServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ protected function setupConfig(): void
$this->app->configure('soar');
$this->app->bindIf(
ConnectionInterface::class,
static fn (Container $container): Connection => $container['db']->connection()
static fn (Container $container): Connection => $container->make('db')->connection()
);
}

Expand Down

0 comments on commit 90d8390

Please sign in to comment.