@@ -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 | } |
@@ -32,7 +32,7 @@ |
||
32 | 32 | $availableDrivers = $this->api->getDrivers(); |
33 | 33 | |
34 | 34 | $rows = collect($availableDrivers) |
35 | - ->transform(function ($item) use ($installedDrivers) { |
|
35 | + ->transform(function($item) use ($installedDrivers) { |
|
36 | 36 | return [ |
37 | 37 | $item['name'], |
38 | 38 | $item['package'], |
@@ -24,7 +24,7 @@ |
||
24 | 24 | public function handle(): void |
25 | 25 | { |
26 | 26 | $rows = collect($this->channelManager->all()) |
27 | - ->transform(function ($item, $name) { |
|
27 | + ->transform(function($item, $name) { |
|
28 | 28 | return [ |
29 | 29 | $name, |
30 | 30 | $this->channelManager->driver($item['driver'])->getName(), |
@@ -24,7 +24,7 @@ |
||
24 | 24 | public function handle(): void |
25 | 25 | { |
26 | 26 | $rows = collect($this->conversationManager->getIntents()) |
27 | - ->transform(function ($item) { |
|
27 | + ->transform(function($item) { |
|
28 | 28 | return [$item]; |
29 | 29 | }) |
30 | 30 | ->toArray(); |
@@ -48,7 +48,7 @@ |
||
48 | 48 | // Install driver |
49 | 49 | $this->info('Installing driver...'); |
50 | 50 | |
51 | - $result = $this->composer->install($driver['package'], function ($_, $line) use (&$output) { |
|
51 | + $result = $this->composer->install($driver['package'], function($_, $line) use (&$output) { |
|
52 | 52 | $output .= $line; |
53 | 53 | }); |
54 | 54 |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | { |
27 | 27 | public function register(): void |
28 | 28 | { |
29 | - $this->app->singleton(FondBot::class, function () { |
|
29 | + $this->app->singleton(FondBot::class, function() { |
|
30 | 30 | return new FondBot(); |
31 | 31 | }); |
32 | 32 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | |
60 | 60 | Route::prefix('fondbot') |
61 | 61 | ->middleware('fondbot.webhook') |
62 | - ->group(function () { |
|
62 | + ->group(function() { |
|
63 | 63 | Route::get('/', 'FondBot\Foundation\Controller@index'); |
64 | 64 | Route::get('/webhook/{channel}/{secret?}', 'FondBot\Foundation\Controller@webhook')->name('fondbot.webhook'); |
65 | 65 | Route::post('/webhook/{channel}/{secret?}', 'FondBot\Foundation\Controller@webhook')->name('fondbot.webhook'); |
@@ -68,12 +68,12 @@ discard block |
||
68 | 68 | |
69 | 69 | private function registerChannelManager(): void |
70 | 70 | { |
71 | - $this->app->singleton(ChannelManager::class, function () { |
|
71 | + $this->app->singleton(ChannelManager::class, function() { |
|
72 | 72 | $manager = new ChannelManager($this->app); |
73 | 73 | |
74 | 74 | $manager->register( |
75 | 75 | collect(config('fondbot.channels')) |
76 | - ->mapWithKeys(function (array $parameters, string $name) { |
|
76 | + ->mapWithKeys(function(array $parameters, string $name) { |
|
77 | 77 | return [$name => $parameters]; |
78 | 78 | }) |
79 | 79 | ->toArray() |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | |
86 | 86 | private function registerConversationManager(): void |
87 | 87 | { |
88 | - $this->app->singleton(ConversationManager::class, function () { |
|
88 | + $this->app->singleton(ConversationManager::class, function() { |
|
89 | 89 | $manager = new ConversationManager($this->app, $this->app[Cache::class]); |
90 | 90 | |
91 | 91 | $namespace = $this->app->getNamespace(); |