Completed
Push — master ( be64fd...6b42b9 )
by Marcel
02:31
created
src/BotMan.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
      */
199 199
     public function getBotMessages()
200 200
     {
201
-        return Collection::make($this->getDriver()->getMessages())->filter(function (IncomingMessage $message) {
201
+        return Collection::make($this->getDriver()->getMessages())->filter(function(IncomingMessage $message) {
202 202
             return $message->isFromBot();
203 203
         })->toArray();
204 204
     }
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
     {
250 250
         preg_match_all(Matcher::PARAM_NAME_REGEX, $value, $matches);
251 251
 
252
-        return array_map(function ($m) {
252
+        return array_map(function($m) {
253 253
             return trim($m, '?');
254 254
         }, $matches[1]);
255 255
     }
@@ -364,9 +364,9 @@  discard block
 block discarded – undo
364 364
         if ($driverEvent instanceof DriverEventInterface) {
365 365
             $this->firedDriverEvents = true;
366 366
 
367
-            Collection::make($this->events)->filter(function ($event) use ($driverEvent) {
367
+            Collection::make($this->events)->filter(function($event) use ($driverEvent) {
368 368
                 return $driverEvent->getName() === $event['name'];
369
-            })->each(function ($event) use ($driverEvent) {
369
+            })->each(function($event) use ($driverEvent) {
370 370
                 /**
371 371
                  * Load the message, so driver events can reply.
372 372
                  */
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
         try {
390 390
             $isVerificationRequest = $this->verifyServices();
391 391
 
392
-            if (! $isVerificationRequest) {
392
+            if ( ! $isVerificationRequest) {
393 393
                 $this->fireDriverEvents();
394 394
 
395 395
                 if ($this->firedDriverEvents === false) {
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
             // Set the message first, so it's available for middlewares
434 434
             $this->message = $matchingMessage->getMessage();
435 435
 
436
-            $commandMiddleware = Collection::make($this->command->getMiddleware())->filter(function ($middleware) {
436
+            $commandMiddleware = Collection::make($this->command->getMiddleware())->filter(function($middleware) {
437 437
                 return $middleware instanceof Heard;
438 438
             })->toArray();
439 439
 
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
      */
541 541
     public function ask($question, $next, $additionalParameters = [], $recipient = null, $driver = null)
542 542
     {
543
-        if (! is_null($recipient) && ! is_null($driver)) {
543
+        if ( ! is_null($recipient) && ! is_null($driver)) {
544 544
             if (is_string($driver)) {
545 545
                 $driver = DriverManager::loadFromName($driver, $this->config);
546 546
             }
@@ -611,7 +611,7 @@  discard block
 block discarded – undo
611 611
      */
612 612
     public function sendPayload($payload)
613 613
     {
614
-        return $this->middleware->applyMiddleware('sending', $payload, [], function ($payload) {
614
+        return $this->middleware->applyMiddleware('sending', $payload, [], function($payload) {
615 615
             $this->outgoingMessage = null;
616 616
 
617 617
             return $this->getDriver()->sendPayload($payload);
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
      */
638 638
     protected function makeInvokableAction($action)
639 639
     {
640
-        if (! method_exists($action, '__invoke')) {
640
+        if ( ! method_exists($action, '__invoke')) {
641 641
             throw new UnexpectedValueException(sprintf(
642 642
                 'Invalid hears action: [%s]', $action
643 643
             ));
Please login to merge, or discard this patch.