1 | <?php |
||
18 | abstract class PackageServiceProvider extends ServiceProvider |
||
19 | { |
||
20 | /* ----------------------------------------------------------------- |
||
21 | | Traits |
||
22 | | ----------------------------------------------------------------- |
||
23 | */ |
||
24 | |||
25 | use HasConfig, |
||
26 | HasFactories, |
||
27 | HasMigrations, |
||
28 | HasTranslations, |
||
29 | HasViews; |
||
30 | |||
31 | /* ----------------------------------------------------------------- |
||
32 | | Properties |
||
33 | | ----------------------------------------------------------------- |
||
34 | */ |
||
35 | |||
36 | /** |
||
37 | * Vendor name. |
||
38 | * |
||
39 | * @var string |
||
40 | */ |
||
41 | protected $vendor = 'arcanedev'; |
||
42 | |||
43 | /** |
||
44 | * Package name. |
||
45 | * |
||
46 | * @var string |
||
47 | */ |
||
48 | protected $package = ''; |
||
49 | |||
50 | /** |
||
51 | * Package base path. |
||
52 | * |
||
53 | * @var string |
||
54 | */ |
||
55 | protected $basePath; |
||
56 | |||
57 | /* ----------------------------------------------------------------- |
||
58 | | Constructor |
||
59 | | ----------------------------------------------------------------- |
||
60 | */ |
||
61 | |||
62 | /** |
||
63 | * Create a new service provider instance. |
||
64 | * |
||
65 | * @param \Illuminate\Contracts\Foundation\Application $app |
||
66 | */ |
||
67 | 18 | public function __construct(Application $app) |
|
73 | |||
74 | /** |
||
75 | * Resolve the base path of the package. |
||
76 | * |
||
77 | * @return string |
||
78 | */ |
||
79 | 18 | protected function resolveBasePath() |
|
85 | |||
86 | /* ----------------------------------------------------------------- |
||
87 | | Getters & Setters |
||
88 | | ----------------------------------------------------------------- |
||
89 | */ |
||
90 | |||
91 | /** |
||
92 | * Get the base path of the package. |
||
93 | * |
||
94 | * @return string |
||
95 | */ |
||
96 | 18 | public function getBasePath() |
|
100 | |||
101 | /* ----------------------------------------------------------------- |
||
102 | | Main Methods |
||
103 | | ----------------------------------------------------------------- |
||
104 | */ |
||
105 | |||
106 | /** |
||
107 | * Register the service provider. |
||
108 | */ |
||
109 | 18 | public function register() |
|
115 | |||
116 | /* ----------------------------------------------------------------- |
||
117 | | Package Methods |
||
118 | | ----------------------------------------------------------------- |
||
119 | */ |
||
120 | |||
121 | /** |
||
122 | * Publish all the package files. |
||
123 | * |
||
124 | * @param bool $load |
||
125 | */ |
||
126 | protected function publishAll($load = true) |
||
134 | |||
135 | /* ----------------------------------------------------------------- |
||
136 | | Check Methods |
||
137 | | ----------------------------------------------------------------- |
||
138 | */ |
||
139 | |||
140 | /** |
||
141 | * Check package name. |
||
142 | * |
||
143 | * @throws \Arcanedev\Support\Exceptions\PackageException |
||
144 | */ |
||
145 | 18 | private function checkPackageName(): void |
|
151 | } |
||
152 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: