Skip to content

Commit 8583094

Browse files
authored
refactor: remove unused closure parameters in DatabaseServiceProvider (#57644)
Remove unused $app parameters from closures that don't use the application container instance. These closures only instantiate classes without dependencies, so the container parameter is not needed. - db.transactions singleton - ConcurrencyErrorDetectorContract singleton - LostConnectionDetectorContract singleton
1 parent 0fc5528 commit 8583094

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Illuminate/Database/DatabaseServiceProvider.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ protected function registerConnectionServices()
7676
return $app['db']->connection()->getSchemaBuilder();
7777
});
7878

79-
$this->app->singleton('db.transactions', function ($app) {
79+
$this->app->singleton('db.transactions', function () {
8080
return new DatabaseTransactionsManager;
8181
});
8282

83-
$this->app->singleton(ConcurrencyErrorDetectorContract::class, function ($app) {
83+
$this->app->singleton(ConcurrencyErrorDetectorContract::class, function () {
8484
return new ConcurrencyErrorDetector;
8585
});
8686

87-
$this->app->singleton(LostConnectionDetectorContract::class, function ($app) {
87+
$this->app->singleton(LostConnectionDetectorContract::class, function () {
8888
return new LostConnectionDetector;
8989
});
9090
}

0 commit comments

Comments
 (0)