1 | <?php |
||
8 | class HashidServiceProvider extends ServiceProvider |
||
9 | { |
||
10 | /** |
||
11 | * Indicates if loading of the provider is deferred. |
||
12 | * |
||
13 | * @var bool |
||
14 | */ |
||
15 | protected $defer = true; |
||
16 | |||
17 | /** |
||
18 | * Bootstrap the service provider. |
||
19 | * |
||
20 | * @return void |
||
21 | */ |
||
22 | 7 | public function boot() |
|
26 | |||
27 | /** |
||
28 | * Register the service provider. |
||
29 | * |
||
30 | * @return void |
||
31 | */ |
||
32 | 7 | public function register() |
|
39 | |||
40 | /** |
||
41 | * Setup package assets. |
||
42 | * |
||
43 | * @return void |
||
44 | */ |
||
45 | 7 | protected function setupAssets() |
|
57 | |||
58 | /** |
||
59 | * Register service bindings. |
||
60 | * |
||
61 | * @return void |
||
62 | */ |
||
63 | 7 | protected function registerServices() |
|
64 | 7 | { |
|
65 | 7 | foreach ($this->getSingletonBindings() as $abstract => $concrete) { |
|
66 | 7 | $this->app->singleton($abstract, function ($app) use ($concrete) { |
|
67 | 5 | return $this->createInstance($concrete, [$app]); |
|
68 | 7 | }); |
|
69 | |||
70 | 7 | $this->app->alias($abstract, $concrete); |
|
71 | 7 | } |
|
72 | |||
73 | 7 | foreach ($this->getClassAliases() as $abstract => $alias) { |
|
74 | 7 | $this->app->alias($abstract, $alias); |
|
75 | 7 | } |
|
76 | 7 | } |
|
77 | |||
78 | /** |
||
79 | * Create a new instance from class name. |
||
80 | * |
||
81 | * @param string $class |
||
82 | * @param array $args |
||
83 | * @return mixed |
||
84 | */ |
||
85 | 5 | protected function createInstance($class, array $args = []) |
|
95 | |||
96 | /** |
||
97 | * Get singleton bindings to be registered. |
||
98 | * |
||
99 | * @return array |
||
100 | */ |
||
101 | 7 | protected function getSingletonBindings() |
|
111 | |||
112 | /** |
||
113 | * Get class aliases to be registered. |
||
114 | * |
||
115 | * @return array |
||
116 | */ |
||
117 | 7 | protected function getClassAliases() |
|
125 | |||
126 | /** |
||
127 | * Register console commands. |
||
128 | * |
||
129 | * @return void |
||
130 | */ |
||
131 | 7 | protected function registerCommands() |
|
140 | |||
141 | /** |
||
142 | * Get the services provided by the provider. |
||
143 | * |
||
144 | * @return string[] |
||
145 | */ |
||
146 | 2 | public function provides() |
|
153 | } |
||
154 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.