1 | <?php |
||
14 | class Installer implements InstallerContract |
||
15 | { |
||
16 | /** |
||
17 | * {@inheritdoc} |
||
18 | */ |
||
19 | public function writeConfig(array $config, string $filePath) : bool |
||
20 | { |
||
21 | try { |
||
22 | $env = new DotenvEditor; |
||
23 | $env->load($filePath); |
||
24 | } catch (InvalidArgumentException $e) { |
||
25 | return false; |
||
26 | } |
||
27 | |||
28 | collect($config)->each(function ($value, $key) use ($env) { |
||
29 | $env->set($key, $value); |
||
30 | }); |
||
31 | |||
32 | return $env->save(); |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | public function sendTestException() : array |
||
39 | { |
||
40 | return App::makeWith( |
||
41 | Reporter::class, |
||
42 | ['config' => Config::get('honeybadger')] |
||
43 | )->notify(new TestException); |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * {@inheritdoc} |
||
48 | */ |
||
49 | public function publishLaravelConfig() : bool |
||
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | public function shouldPublishConfig(): bool |
||
63 | |||
64 | /** |
||
65 | * {@inheritdoc} |
||
66 | */ |
||
67 | public function publishLumenConfig(string $stubPath = null): bool |
||
78 | } |
||
79 |