remove Application type hinting

This commit is contained in:
Holger Reinhardt 2016-07-29 14:05:07 +02:00
parent c2e8486494
commit 02f2712fab

View File

@ -2,7 +2,6 @@
namespace Hlgrrnhrdt\Resque;
use Hlgrrnhrdt\Resque\Console\WorkCommand;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Support\ServiceProvider;
use Resque;
@ -24,24 +23,22 @@ class ResqueServiceProvider extends ServiceProvider
$this->registerWorkCommand();
}
protected function registerManager()
{
$this->app->singleton('resque.manager', function (Application $app) {
$config = $app['config']['resque.connection'];
$this->app->singleton('resque.manager', function () {
$config = $this->app['config']['resque.connection'];
$resque = new Resque();
$resque->setBackend(implode(':', [$config['host'], $config['port']]), $config['db']);
return new ResqueManager($resque, $app['config']['resque.trackStatus']);
return new ResqueManager($resque, $this->app['config']['resque.trackStatus']);
});
}
protected function registerWorkCommand()
{
$this->app->singleton('command.resque.work', function (Application $app) {
return new WorkCommand($app->make('resque.manager'));
$this->app->singleton('command.resque.work', function () {
return new WorkCommand($this->app->make('resque.manager'));
});
$this->commands('command.resque.work');
}