padosoft /
laravel-super-cache
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace Padosoft\SuperCache; |
||||
| 4 | |||||
| 5 | use Illuminate\Support\ServiceProvider; |
||||
| 6 | use Padosoft\SuperCache\Console\GetAllTagsOfKeyCommand; |
||||
| 7 | use Padosoft\SuperCache\Console\GetClusterNodesCommand; |
||||
| 8 | use Padosoft\SuperCache\Console\ListenerCommand; |
||||
| 9 | use Padosoft\SuperCache\Console\CleanOrphanedKeysCommand; |
||||
| 10 | class SuperCacheServiceProvider extends ServiceProvider |
||||
| 11 | { |
||||
| 12 | public function register() |
||||
| 13 | { |
||||
| 14 | $this->mergeConfigFrom( |
||||
| 15 | __DIR__ . '/../config/supercache.php', |
||||
| 16 | 'supercache' |
||||
| 17 | ); |
||||
| 18 | $this->app->singleton(SuperCacheManager::class, function ($app) { |
||||
|
0 ignored issues
–
show
|
|||||
| 19 | return new SuperCacheManager(new RedisConnector()); |
||||
| 20 | }); |
||||
| 21 | |||||
| 22 | $this->app->singleton('supercache', function ($app) { |
||||
|
0 ignored issues
–
show
The parameter
$app is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. Loading history...
|
|||||
| 23 | return new SuperCacheManager(new RedisConnector()); |
||||
| 24 | }); |
||||
| 25 | } |
||||
| 26 | |||||
| 27 | public function boot() |
||||
| 28 | { |
||||
| 29 | // Carica configurazione |
||||
| 30 | $this->publishes([ |
||||
| 31 | __DIR__ . '/../config/supercache.php' => config_path('supercache.php'), |
||||
| 32 | ], 'config'); |
||||
| 33 | |||||
| 34 | // Registra i comandi |
||||
| 35 | if ($this->app->runningInConsole()) { |
||||
| 36 | $this->commands([ |
||||
| 37 | GetAllTagsOfKeyCommand::class, |
||||
| 38 | ListenerCommand::class, |
||||
| 39 | CleanOrphanedKeysCommand::class, |
||||
| 40 | GetClusterNodesCommand::class, |
||||
| 41 | ]); |
||||
| 42 | } |
||||
| 43 | } |
||||
| 44 | } |
||||
| 45 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.