1 | <?php namespace Arcanedev\Support; |
||
13 | abstract class ServiceProvider extends IlluminateServiceProvider |
||
14 | { |
||
15 | /* ------------------------------------------------------------------------------------------------ |
||
16 | | Properties |
||
17 | | ------------------------------------------------------------------------------------------------ |
||
18 | */ |
||
19 | /** |
||
20 | * The application instance. |
||
21 | * |
||
22 | * @var \Illuminate\Foundation\Application |
||
23 | */ |
||
24 | protected $app; |
||
25 | |||
26 | /** |
||
27 | * The aliases collection. |
||
28 | * |
||
29 | * @var array |
||
30 | */ |
||
31 | protected $aliases = []; |
||
32 | |||
33 | /** |
||
34 | * Alias loader. |
||
35 | * |
||
36 | * @var \Illuminate\Foundation\AliasLoader |
||
37 | */ |
||
38 | private $aliasLoader; |
||
39 | |||
40 | /* ------------------------------------------------------------------------------------------------ |
||
41 | | Constructor |
||
42 | | ------------------------------------------------------------------------------------------------ |
||
43 | */ |
||
44 | /** |
||
45 | * Create a new service provider instance. |
||
46 | * |
||
47 | * @param \Illuminate\Contracts\Foundation\Application $app |
||
48 | */ |
||
49 | 9 | public function __construct(Application $app) |
|
55 | |||
56 | /* ------------------------------------------------------------------------------------------------ |
||
57 | | Main Functions |
||
58 | | ------------------------------------------------------------------------------------------------ |
||
59 | */ |
||
60 | /** |
||
61 | * Register the service provider. |
||
62 | */ |
||
63 | 9 | public function register() |
|
64 | { |
||
65 | // |
||
66 | 9 | } |
|
67 | |||
68 | /** |
||
69 | * Boot the service provider. |
||
70 | */ |
||
71 | public function boot() |
||
75 | |||
76 | /** |
||
77 | * Register a binding with the container. |
||
78 | * |
||
79 | * @param string|array $abstract |
||
80 | * @param \Closure|string|null $concrete |
||
81 | * @param bool $shared |
||
82 | */ |
||
83 | public function bind($abstract, $concrete = null, $shared = false) |
||
87 | |||
88 | /** |
||
89 | * Register a shared binding in the container. |
||
90 | * |
||
91 | * @param string|array $abstract |
||
92 | * @param \Closure|string|null $concrete |
||
93 | */ |
||
94 | protected function singleton($abstract, $concrete = null) |
||
98 | |||
99 | /** |
||
100 | * Register a service provider. |
||
101 | * |
||
102 | * @param \Illuminate\Support\ServiceProvider|string $provider |
||
103 | * @param array $options |
||
104 | * @param bool $force |
||
105 | * |
||
106 | * @return \Illuminate\Support\ServiceProvider |
||
107 | */ |
||
108 | protected function registerProvider($provider, array $options = [], $force = false) |
||
112 | |||
113 | /** |
||
114 | * Register multiple service providers. |
||
115 | * |
||
116 | * @param array $providers |
||
117 | */ |
||
118 | protected function registerProviders(array $providers) |
||
124 | |||
125 | /** |
||
126 | * Register a console service provider. |
||
127 | * |
||
128 | * @param \Illuminate\Support\ServiceProvider|string $provider |
||
129 | * @param array $options |
||
130 | * @param bool $force |
||
131 | * |
||
132 | * @return \Illuminate\Support\ServiceProvider|null |
||
133 | */ |
||
134 | protected function registerConsoleServiceProvider($provider, array $options = [], $force = false) |
||
140 | |||
141 | /** |
||
142 | * Register aliases (Facades). |
||
143 | */ |
||
144 | protected function registerAliases() |
||
154 | |||
155 | /** |
||
156 | * Add an aliases to the loader. |
||
157 | * |
||
158 | * @param array $aliases |
||
159 | * |
||
160 | * @return self |
||
161 | */ |
||
162 | protected function aliases(array $aliases) |
||
170 | |||
171 | /** |
||
172 | * Add an alias to the loader. |
||
173 | * |
||
174 | * @param string $class |
||
175 | * @param string $alias |
||
176 | * |
||
177 | * @return self |
||
178 | */ |
||
179 | protected function alias($class, $alias) |
||
185 | |||
186 | /* ------------------------------------------------------------------------------------------------ |
||
187 | | Services |
||
188 | | ------------------------------------------------------------------------------------------------ |
||
189 | */ |
||
190 | /** |
||
191 | * Get the config repository instance. |
||
192 | * |
||
193 | * @return \Illuminate\Config\Repository |
||
194 | */ |
||
195 | protected function config() |
||
199 | |||
200 | /** |
||
201 | * Get the filesystem instance. |
||
202 | * |
||
203 | * @return \Illuminate\Filesystem\Filesystem |
||
204 | */ |
||
205 | protected function filesystem() |
||
209 | } |
||
210 |
This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.
Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.