Conditions | 1 |
Paths | 1 |
Total Lines | 38 |
Code Lines | 30 |
Lines | 0 |
Ratio | 0 % |
Tests | 20 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
28 | 6 | public function handle(Container $container) |
|
|
|||
29 | { |
||
30 | 6 | $path = base_path('laravel-echo-server.json'); |
|
31 | 6 | file_put_contents( |
|
32 | 6 | $path, |
|
33 | 6 | json_encode(array_replace_recursive([ |
|
34 | 6 | 'authHost' => url('/'), |
|
35 | 6 | 'authEndpoint' => '/broadcasting/auth', |
|
36 | 6 | 'database' => 'redis', |
|
37 | 'databaseConfig' => [ |
||
38 | 'redis' => [ |
||
39 | 6 | 'host' => config('database.redis.default.host'), |
|
40 | 6 | 'port' => config('database.redis.default.port'), |
|
41 | ], |
||
42 | 'sqlite' => [ |
||
43 | 'databasePath' => '/storage/laravel-echo-server.sqlite', |
||
44 | ], |
||
45 | ], |
||
46 | 6 | 'devMode' => config('app.debug'), |
|
47 | 6 | 'host' => parse_url(url('/'), PHP_URL_HOST), |
|
48 | 6 | 'port' => 6001, |
|
49 | 6 | 'protocol' => 'http', |
|
50 | 'socketio' => [], |
||
51 | 6 | 'sslCertPath' => '', |
|
52 | 6 | 'sslKeyPath' => '', |
|
53 | 6 | 'sslCertChainPath' => '', |
|
54 | 6 | 'sslPassphrase' => '', |
|
55 | 'apiOriginAllow' => [ |
||
56 | 'allowCors' => false, |
||
57 | 'allowOrigin' => '', |
||
58 | 'allowMethods' => '', |
||
59 | 'allowHeaders' => '' |
||
60 | ] |
||
61 | 6 | ], $this->config), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) |
|
62 | ); |
||
63 | |||
64 | 6 | return 'Config file for web-socket server created. File: '.$path; |
|
65 | } |
||
66 | } |
||
67 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.