mirror of
https://github.com/flarum/core.git
synced 2025-10-12 07:24:27 +02:00
Add Interface suffix to SettingsRepository
This commit is contained in:
@@ -13,7 +13,7 @@ namespace Flarum\Settings;
|
||||
|
||||
use Illuminate\Database\ConnectionInterface;
|
||||
|
||||
class DatabaseSettingsRepository implements SettingsRepository
|
||||
class DatabaseSettingsRepository implements SettingsRepositoryInterface
|
||||
{
|
||||
protected $database;
|
||||
|
||||
|
@@ -11,7 +11,7 @@
|
||||
|
||||
namespace Flarum\Settings;
|
||||
|
||||
class MemoryCacheSettingsRepository implements SettingsRepository
|
||||
class MemoryCacheSettingsRepository implements SettingsRepositoryInterface
|
||||
{
|
||||
protected $inner;
|
||||
|
||||
@@ -19,7 +19,7 @@ class MemoryCacheSettingsRepository implements SettingsRepository
|
||||
|
||||
protected $cache = [];
|
||||
|
||||
public function __construct(SettingsRepository $inner)
|
||||
public function __construct(SettingsRepositoryInterface $inner)
|
||||
{
|
||||
$this->inner = $inner;
|
||||
}
|
||||
|
@@ -11,7 +11,7 @@
|
||||
|
||||
namespace Flarum\Settings;
|
||||
|
||||
interface SettingsRepository
|
||||
interface SettingsRepositoryInterface
|
||||
{
|
||||
public function all();
|
||||
|
@@ -19,7 +19,7 @@ class SettingsServiceProvider extends AbstractServiceProvider
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$this->app->singleton('Flarum\Settings\SettingsRepository', function () {
|
||||
$this->app->singleton('Flarum\Settings\SettingsRepositoryInterface', function () {
|
||||
return new MemoryCacheSettingsRepository(
|
||||
new DatabaseSettingsRepository(
|
||||
$this->app->make('Illuminate\Database\ConnectionInterface')
|
||||
@@ -27,6 +27,6 @@ class SettingsServiceProvider extends AbstractServiceProvider
|
||||
);
|
||||
});
|
||||
|
||||
$this->app->alias('Flarum\Settings\SettingsRepository', 'flarum.settings');
|
||||
$this->app->alias('Flarum\Settings\SettingsRepositoryInterface', 'flarum.settings');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user