Completed
Push — master ( 23625b...6aee65 )
by Kirill
06:23
created
src/Resources/Messages.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * This file is part of GitterApi package.
4 4
  *
@@ -42,15 +42,15 @@  discard block
 block discarded – undo
42 42
      */
43 43
     public function all(string $roomId, string $query = null, string $beforeId = null): \Generator
44 44
     {
45
-        $limit    = 100;
45
+        $limit = 100;
46 46
 
47 47
         do {
48 48
             $route = Route::get('rooms/{roomId}/chatMessages')
49 49
                 ->with('roomId', $roomId)
50
-                ->with('limit', (string)$limit);
50
+                ->with('limit', (string) $limit);
51 51
 
52 52
             if ($beforeId !== null) {
53
-                $route->with('beforeId', (string)$beforeId);
53
+                $route->with('beforeId', (string) $beforeId);
54 54
             }
55 55
 
56 56
             if ($query !== null) {
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
             $response = array_reverse($this->fetch($route));
61 61
 
62 62
             foreach ($response as $message) {
63
-                $beforeId = (string)$message['id'];
63
+                $beforeId = (string) $message['id'];
64 64
                 yield $message;
65 65
             }
66 66
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     {
81 81
         return $this->fetch(
82 82
             Route::get('rooms/{roomId}/chatMessages/{messageId}')
83
-                ->withMany([ 'roomId' => $roomId, 'messageId' => $messageId ])
83
+                ->withMany(['roomId' => $roomId, 'messageId' => $messageId])
84 84
         );
85 85
     }
86 86
 
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
     {
117 117
         return $this->fetch(
118 118
             Route::put('rooms/{roomId}/chatMessages/{messageId}')
119
-                ->withMany([ 'roomId' => $roomId, 'messageId' => $messageId ])
119
+                ->withMany(['roomId' => $roomId, 'messageId' => $messageId])
120 120
                 ->withBody('text', $content)
121 121
         );
122 122
     }
Please login to merge, or discard this patch.