mirror of
https://github.com/flarum/core.git
synced 2025-07-19 15:51:16 +02:00
Use ::class constant instead of hardcoded strings
This commit is contained in:
@@ -20,7 +20,7 @@ class ExtensionServiceProvider extends AbstractServiceProvider
|
|||||||
*/
|
*/
|
||||||
public function register()
|
public function register()
|
||||||
{
|
{
|
||||||
$this->app->bind('flarum.extensions', 'Flarum\Extension\ExtensionManager');
|
$this->app->bind('flarum.extensions', ExtensionManager::class);
|
||||||
|
|
||||||
$bootstrappers = $this->app->make('flarum.extensions')->getEnabledBootstrappers();
|
$bootstrappers = $this->app->make('flarum.extensions')->getEnabledBootstrappers();
|
||||||
|
|
||||||
@@ -38,6 +38,6 @@ class ExtensionServiceProvider extends AbstractServiceProvider
|
|||||||
{
|
{
|
||||||
$events = $this->app->make('events');
|
$events = $this->app->make('events');
|
||||||
|
|
||||||
$events->subscribe('Flarum\Extension\DefaultLanguagePackGuard');
|
$events->subscribe(DefaultLanguagePackGuard::class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -20,7 +20,7 @@ class SettingsServiceProvider extends AbstractServiceProvider
|
|||||||
*/
|
*/
|
||||||
public function register()
|
public function register()
|
||||||
{
|
{
|
||||||
$this->app->singleton('Flarum\Settings\SettingsRepositoryInterface', function () {
|
$this->app->singleton(SettingsRepositoryInterface::class, function () {
|
||||||
return new MemoryCacheSettingsRepository(
|
return new MemoryCacheSettingsRepository(
|
||||||
new DatabaseSettingsRepository(
|
new DatabaseSettingsRepository(
|
||||||
$this->app->make('Illuminate\Database\ConnectionInterface')
|
$this->app->make('Illuminate\Database\ConnectionInterface')
|
||||||
@@ -28,6 +28,6 @@ class SettingsServiceProvider extends AbstractServiceProvider
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->app->alias('Flarum\Settings\SettingsRepositoryInterface', 'flarum.settings');
|
$this->app->alias(SettingsRepositoryInterface::class, 'flarum.settings');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user