1 | <?php |
||
11 | abstract class HoneybadgerInstallCommand extends Command |
||
12 | { |
||
13 | /** |
||
14 | * The name and signature of the console command. |
||
15 | * |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $signature = 'honeybadger:install {apiKey?}'; |
||
19 | |||
20 | /** |
||
21 | * The console command description. |
||
22 | * |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $description = 'Install and configure Honeybadger'; |
||
26 | |||
27 | /** |
||
28 | * Results of each step of the install. |
||
29 | * |
||
30 | * @var array |
||
31 | */ |
||
32 | protected $results = []; |
||
33 | |||
34 | /** |
||
35 | * Configuration from gathered input. |
||
36 | * |
||
37 | * @var array |
||
38 | */ |
||
39 | protected $config = []; |
||
40 | |||
41 | /** |
||
42 | * Execute the console command. |
||
43 | * |
||
44 | * @return mixed |
||
45 | */ |
||
46 | public function handle() |
||
65 | |||
66 | /** |
||
67 | * Publish the configuration file to the framework. |
||
68 | * |
||
69 | * @return bool |
||
70 | */ |
||
71 | abstract public function publishConfig(); |
||
72 | |||
73 | /** |
||
74 | * Prompt for input and gather responses. |
||
75 | * |
||
76 | * @return array |
||
77 | */ |
||
78 | private function gatherConfig() |
||
85 | |||
86 | /** |
||
87 | * Send test exception to Honeybadger |
||
88 | * |
||
89 | * @return void |
||
90 | */ |
||
91 | private function sendTest() |
||
100 | |||
101 | /** |
||
102 | * Write configuration values to the env files. |
||
103 | * |
||
104 | * @return void |
||
105 | */ |
||
106 | private function writeEnv() |
||
118 | |||
119 | /** |
||
120 | * Whether the configuration needs to be published or no. |
||
121 | * |
||
122 | * @return bool |
||
123 | */ |
||
124 | private function shouldPublishConfig() |
||
128 | |||
129 | /** |
||
130 | * Write the configurations to dotenv files. |
||
131 | * |
||
132 | * @param string $config |
||
133 | * @param string $file |
||
134 | * @return bool |
||
135 | */ |
||
136 | private function writeConfig($config, $file = '.env') |
||
151 | |||
152 | /** |
||
153 | * Add the results of each installation step. |
||
154 | * |
||
155 | * @param string $name |
||
156 | * @param string $result |
||
157 | * @return void |
||
158 | */ |
||
159 | public function task($name, $result) |
||
163 | |||
164 | /** |
||
165 | * Output the results of each step of the installation. |
||
166 | * |
||
167 | * @return void |
||
168 | */ |
||
169 | private function outputResults() |
||
178 | } |
||
179 |
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: