@@ -54,7 +54,7 @@ |
||
54 | 54 | */ |
55 | 55 | public function getByDriver(string $driver): Collection |
56 | 56 | { |
57 | - return $this->channels->filter(function (array $channel) use ($driver) { |
|
57 | + return $this->channels->filter(function(array $channel) use ($driver) { |
|
58 | 58 | return $channel['driver'] === $driver; |
59 | 59 | }); |
60 | 60 | } |
@@ -34,7 +34,7 @@ |
||
34 | 34 | */ |
35 | 35 | public function initialize(Collection $parameters): DriverContract |
36 | 36 | { |
37 | - $parameters->each(function ($value, $key) { |
|
37 | + $parameters->each(function($value, $key) { |
|
38 | 38 | $key = Str::camel($key); |
39 | 39 | $this->$key = $value; |
40 | 40 | }); |
@@ -39,7 +39,7 @@ |
||
39 | 39 | */ |
40 | 40 | public function findDriver(string $name): ?array |
41 | 41 | { |
42 | - return $this->getDrivers()->first(function ($item) use ($name) { |
|
42 | + return $this->getDrivers()->first(function($item) use ($name) { |
|
43 | 43 | return $item['name'] === $name; |
44 | 44 | }); |
45 | 45 | } |
@@ -102,8 +102,8 @@ |
||
102 | 102 | { |
103 | 103 | Route::middleware(InitializeKernel::class) |
104 | 104 | ->namespace('FondBot\Foundation\Http\Controllers') |
105 | - ->group(function () { |
|
106 | - Route::group(['middleware' => 'fondbot.webhook'], function () { |
|
105 | + ->group(function() { |
|
106 | + Route::group(['middleware' => 'fondbot.webhook'], function() { |
|
107 | 107 | Route::get('/fondbot/{channel}/{secret?}', 'WebhookController@store')->name('fondbot.webhook'); |
108 | 108 | Route::post('/fondbot/{channel}/{secret?}', 'WebhookController@store')->name('fondbot.webhook'); |
109 | 109 | }); |
@@ -37,7 +37,7 @@ |
||
37 | 37 | // Install driver |
38 | 38 | $this->info('Installing driver...'); |
39 | 39 | |
40 | - $result = $composer->install($driver['package'], function ($_, $line) use (&$output) { |
|
40 | + $result = $composer->install($driver['package'], function($_, $line) use (&$output) { |
|
41 | 41 | $output .= $line; |
42 | 42 | }); |
43 | 43 |
@@ -15,7 +15,7 @@ |
||
15 | 15 | public function handle(Manager $manager): void |
16 | 16 | { |
17 | 17 | $rows = collect($manager->getIntents()) |
18 | - ->transform(function ($item) { |
|
18 | + ->transform(function($item) { |
|
19 | 19 | return [$item]; |
20 | 20 | }) |
21 | 21 | ->toArray(); |
@@ -15,7 +15,7 @@ |
||
15 | 15 | public function handle(ChannelManager $manager): void |
16 | 16 | { |
17 | 17 | $rows = collect($manager->all()) |
18 | - ->transform(function ($item, $name) use ($manager) { |
|
18 | + ->transform(function($item, $name) use ($manager) { |
|
19 | 19 | return [$name, $manager->driver($item['driver'])->getName(), $manager->create($name)->getWebhookUrl()]; |
20 | 20 | }) |
21 | 21 | ->toArray(); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | $availableDrivers = $api->getDrivers(); |
22 | 22 | |
23 | 23 | $rows = collect($availableDrivers) |
24 | - ->transform(function ($item) use ($installedDrivers) { |
|
24 | + ->transform(function($item) use ($installedDrivers) { |
|
25 | 25 | return [ |
26 | 26 | $item['name'], |
27 | 27 | $item['package'], |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | |
31 | 31 | protected function registerConversationManager(): void |
32 | 32 | { |
33 | - $this->app->singleton(ConversationManagerContract::class, function () { |
|
33 | + $this->app->singleton(ConversationManagerContract::class, function() { |
|
34 | 34 | return new ConversationManager($this->app, $this->app[CacheRepository::class]); |
35 | 35 | }); |
36 | 36 | |
@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | |
40 | 40 | protected function registerChannelManager(): void |
41 | 41 | { |
42 | - $this->app->singleton(ChannelManagerContract::class, function () { |
|
43 | - $channels = collect(config('fondbot.channels'))->mapWithKeys(function (array $parameters, string $name) { |
|
42 | + $this->app->singleton(ChannelManagerContract::class, function() { |
|
43 | + $channels = collect(config('fondbot.channels'))->mapWithKeys(function(array $parameters, string $name) { |
|
44 | 44 | return [$name => $parameters]; |
45 | 45 | }); |
46 | 46 |