@@ -48,12 +48,12 @@ discard block |
||
| 48 | 48 | $chatId = $update->getEffectiveChat() ? $update->getEffectiveChat()->getId() : null; |
| 49 | 49 | if ($chatId) { |
| 50 | 50 | $this->conversationManager->getConversationHandler($chatId) |
| 51 | - ->then(function ($handler) use ($deferred, &$listeners) { |
|
| 51 | + ->then(function($handler) use ($deferred, &$listeners) { |
|
| 52 | 52 | if ($handler) { |
| 53 | 53 | $listeners[] = new Listener($handler, $this->container); |
| 54 | 54 | } |
| 55 | 55 | $deferred->resolve($listeners); |
| 56 | - })->otherwise(function ($e) use ($deferred) { |
|
| 56 | + })->otherwise(function($e) use ($deferred) { |
|
| 57 | 57 | // if something goes wrong, reject the promise |
| 58 | 58 | $deferred->reject($e); |
| 59 | 59 | }); |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | if ($text) { |
| 68 | 68 | $chatId = $update->getEffectiveChat()->getId(); |
| 69 | 69 | $this->conversationManager->getConversationHandler($chatId) |
| 70 | - ->then(function ($handlerInfo) use ($chatId, $text, $deferred, &$listeners) { |
|
| 70 | + ->then(function($handlerInfo) use ($chatId, $text, $deferred, &$listeners) { |
|
| 71 | 71 | if (!$handlerInfo) { |
| 72 | 72 | $this->findListenerAndPush($listeners, 'messages', $text); |
| 73 | 73 | $deferred->resolve($listeners); |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | $deferred->resolve($listeners); |
| 90 | - })->otherwise(function ($e) use ($deferred) { |
|
| 90 | + })->otherwise(function($e) use ($deferred) { |
|
| 91 | 91 | // if something goes wrong, reject the promise |
| 92 | 92 | $deferred->reject($e); |
| 93 | 93 | }); |
@@ -84,14 +84,14 @@ |
||
| 84 | 84 | { |
| 85 | 85 | $update->detectUpdateType(); |
| 86 | 86 | $this->zanzara->resolveListeners($update) |
| 87 | - ->then(function ($listeners) use ($update) { |
|
| 87 | + ->then(function($listeners) use ($update) { |
|
| 88 | 88 | /** @var Listener[] $listeners */ |
| 89 | 89 | foreach ($listeners as $listener) { |
| 90 | 90 | $context = new Context($update, $this->container); |
| 91 | 91 | $middlewareTip = $listener->getTip(); |
| 92 | 92 | $middlewareTip($context); |
| 93 | 93 | } |
| 94 | - })->otherwise(function ($e) use ($update) { |
|
| 94 | + })->otherwise(function($e) use ($update) { |
|
| 95 | 95 | $this->logger->error("Unable to resolve listeners for update $update, reason: $e"); |
| 96 | 96 | }); |
| 97 | 97 | } |