|
11 | 11 |
|
12 | 12 | namespace Vinkla\Pusher;
|
13 | 13 |
|
14 |
| -use Illuminate\Contracts\Container\Container as Application; |
| 14 | +use Illuminate\Contracts\Container\Container; |
15 | 15 | use Illuminate\Foundation\Application as LaravelApplication;
|
16 | 16 | use Illuminate\Support\ServiceProvider;
|
17 | 17 | use Laravel\Lumen\Application as LumenApplication;
|
@@ -59,62 +59,56 @@ protected function setupConfig()
|
59 | 59 | */
|
60 | 60 | public function register()
|
61 | 61 | {
|
62 |
| - $this->registerFactory($this->app); |
63 |
| - $this->registerManager($this->app); |
64 |
| - $this->registerBindings($this->app); |
| 62 | + $this->registerFactory(); |
| 63 | + $this->registerManager(); |
| 64 | + $this->registerBindings(); |
65 | 65 | }
|
66 | 66 |
|
67 | 67 | /**
|
68 | 68 | * Register the factory class.
|
69 | 69 | *
|
70 |
| - * @param \Illuminate\Contracts\Container\Container $app |
71 |
| - * |
72 | 70 | * @return void
|
73 | 71 | */
|
74 |
| - protected function registerFactory(Application $app) |
| 72 | + protected function registerFactory() |
75 | 73 | {
|
76 |
| - $app->singleton('pusher.factory', function () { |
| 74 | + $this->app->singleton('pusher.factory', function () { |
77 | 75 | return new PusherFactory();
|
78 | 76 | });
|
79 | 77 |
|
80 |
| - $app->alias('pusher.factory', PusherFactory::class); |
| 78 | + $this->app->alias('pusher.factory', PusherFactory::class); |
81 | 79 | }
|
82 | 80 |
|
83 | 81 | /**
|
84 | 82 | * Register the manager class.
|
85 | 83 | *
|
86 |
| - * @param \Illuminate\Contracts\Container\Container $app |
87 |
| - * |
88 | 84 | * @return void
|
89 | 85 | */
|
90 |
| - protected function registerManager(Application $app) |
| 86 | + protected function registerManager() |
91 | 87 | {
|
92 |
| - $app->singleton('pusher', function ($app) { |
| 88 | + $this->app->singleton('pusher', function (Container $app) { |
93 | 89 | $config = $app['config'];
|
94 | 90 | $factory = $app['pusher.factory'];
|
95 | 91 |
|
96 | 92 | return new PusherManager($config, $factory);
|
97 | 93 | });
|
98 | 94 |
|
99 |
| - $app->alias('pusher', PusherManager::class); |
| 95 | + $this->app->alias('pusher', PusherManager::class); |
100 | 96 | }
|
101 | 97 |
|
102 | 98 | /**
|
103 | 99 | * Register the bindings.
|
104 | 100 | *
|
105 |
| - * @param \Illuminate\Contracts\Container\Container $app |
106 |
| - * |
107 | 101 | * @return void
|
108 | 102 | */
|
109 |
| - protected function registerBindings(Application $app) |
| 103 | + protected function registerBindings() |
110 | 104 | {
|
111 |
| - $app->bind('pusher.connection', function ($app) { |
| 105 | + $this->app->bind('pusher.connection', function (Container $app) { |
112 | 106 | $manager = $app['pusher'];
|
113 | 107 |
|
114 | 108 | return $manager->connection();
|
115 | 109 | });
|
116 | 110 |
|
117 |
| - $app->alias('pusher.connection', Pusher::class); |
| 111 | + $this->app->alias('pusher.connection', Pusher::class); |
118 | 112 | }
|
119 | 113 |
|
120 | 114 | /**
|
|
0 commit comments