1 | <?php |
||
16 | class CoreServiceProvider extends ServiceProvider |
||
17 | { |
||
18 | use CanPublishConfiguration; |
||
19 | /** |
||
20 | * Indicates if loading of the provider is deferred. |
||
21 | * |
||
22 | * @var bool |
||
23 | */ |
||
24 | protected $defer = false; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $prefix = 'asgard'; |
||
30 | |||
31 | /** |
||
32 | * The filters base class name. |
||
33 | * |
||
34 | * @var array |
||
35 | */ |
||
36 | protected $middleware = [ |
||
37 | 'Core' => [ |
||
38 | 'permissions' => 'PermissionMiddleware', |
||
39 | 'auth.admin' => 'AdminMiddleware', |
||
40 | 'public.checkLocale' => 'PublicMiddleware', |
||
41 | 'localizationRedirect' => 'LocalizationMiddleware', |
||
42 | 'can' => 'Authorization', |
||
43 | ], |
||
44 | ]; |
||
45 | |||
46 | public function boot() |
||
64 | |||
65 | /** |
||
66 | * Register the service provider. |
||
67 | * |
||
68 | * @return void |
||
69 | */ |
||
70 | public function register() |
||
80 | |||
81 | /** |
||
82 | * Get the services provided by the provider. |
||
83 | * |
||
84 | * @return array |
||
85 | */ |
||
86 | public function provides() |
||
90 | |||
91 | /** |
||
92 | * Register the filters. |
||
93 | * |
||
94 | * @param Router $router |
||
95 | * @return void |
||
96 | */ |
||
97 | public function registerMiddleware(Router $router) |
||
107 | |||
108 | /** |
||
109 | * Register the console commands |
||
110 | */ |
||
111 | private function registerCommands() |
||
119 | |||
120 | private function registerServices() |
||
128 | |||
129 | /** |
||
130 | * Register the modules aliases |
||
131 | */ |
||
132 | private function registerModuleResourceNamespaces() |
||
139 | |||
140 | /** |
||
141 | * Register the view namespaces for the modules |
||
142 | * @param Module $module |
||
143 | */ |
||
144 | protected function registerViewNamespace(Module $module) |
||
154 | |||
155 | /** |
||
156 | * Register the language namespaces for the modules |
||
157 | * @param Module $module |
||
158 | */ |
||
159 | protected function registerLanguageNamespace(Module $module) |
||
178 | |||
179 | /** |
||
180 | * @param $file |
||
181 | * @param $package |
||
182 | * @return string |
||
183 | */ |
||
184 | private function getConfigFilename($file) |
||
188 | |||
189 | /** |
||
190 | * Set the locale configuration for |
||
191 | * - laravel localization |
||
192 | * - laravel translatable |
||
193 | */ |
||
194 | private function setLocalesConfigurations() |
||
223 | |||
224 | /** |
||
225 | * @param string $path |
||
226 | * @return bool |
||
227 | */ |
||
228 | private function hasPublishedTranslations($path) |
||
232 | |||
233 | /** |
||
234 | * Does a Module have it's Translations centralised in the Translation module? |
||
235 | * @param Module $module |
||
236 | * @return bool |
||
237 | */ |
||
238 | private function moduleHasCentralisedTranslations(Module $module) |
||
246 | |||
247 | /** |
||
248 | * Get the absolute path to the Centralised Translations for a Module (via the Translations module) |
||
249 | * @param Module $module |
||
250 | * @return string |
||
251 | */ |
||
252 | private function getCentralisedTranslationPath(Module $module) |
||
256 | |||
257 | /** |
||
258 | * List of Custom Blade Directives |
||
259 | */ |
||
260 | public function bladeDirectives() |
||
272 | |||
273 | /** |
||
274 | * Get argument array from argument string. |
||
275 | * @param $argumentString |
||
276 | * @return array |
||
277 | */ |
||
278 | private function getArguments($argumentString) |
||
282 | } |
||
283 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: