@@ -1,4 +1,4 @@ discard block |
||
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 | * |
@@ -49,10 +49,10 @@ discard block |
||
49 | 49 | do { |
50 | 50 | $route = Route::get('rooms/{roomId}/chatMessages') |
51 | 51 | ->with('roomId', $roomId) |
52 | - ->with('limit', (string)$limit); |
|
52 | + ->with('limit', (string) $limit); |
|
53 | 53 | |
54 | 54 | if ($beforeId !== null) { |
55 | - $route->with('beforeId', (string)$beforeId); |
|
55 | + $route->with('beforeId', (string) $beforeId); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | if ($query !== null) { |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $response = array_reverse($this->fetch($route)); |
63 | 63 | |
64 | 64 | foreach ($response as $message) { |
65 | - $beforeId = (string)$message['id']; |
|
65 | + $beforeId = (string) $message['id']; |
|
66 | 66 | yield $message; |
67 | 67 | } |
68 | 68 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | { |
83 | 83 | return $this->fetch( |
84 | 84 | Route::get('rooms/{roomId}/chatMessages/{messageId}') |
85 | - ->withMany([ 'roomId' => $roomId, 'messageId' => $messageId ]) |
|
85 | + ->withMany(['roomId' => $roomId, 'messageId' => $messageId]) |
|
86 | 86 | ); |
87 | 87 | } |
88 | 88 | |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | { |
119 | 119 | return $this->fetch( |
120 | 120 | Route::put('rooms/{roomId}/chatMessages/{messageId}') |
121 | - ->withMany([ 'roomId' => $roomId, 'messageId' => $messageId ]) |
|
121 | + ->withMany(['roomId' => $roomId, 'messageId' => $messageId]) |
|
122 | 122 | ->withBody('text', $content) |
123 | 123 | ); |
124 | 124 | } |
@@ -1,4 +1,4 @@ discard block |
||
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 | * |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | */ |
57 | 57 | public function currentUserId(): string |
58 | 58 | { |
59 | - return (string)($this->current()['id'] ?? null); |
|
59 | + return (string) ($this->current()['id'] ?? null); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | /** |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | */ |
141 | 141 | public function __get(string $resource) |
142 | 142 | { |
143 | - $resolve = function (string $resource) { |
|
143 | + $resolve = function(string $resource) { |
|
144 | 144 | switch ($resource) { |
145 | 145 | // == RESOURCES == |
146 | 146 | case 'users': |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | case 'groups': |
275 | 275 | case 'messages': |
276 | 276 | case 'rooms': |
277 | - throw new \LogicException('Resource ' . $name . ' can not be removed'); |
|
277 | + throw new \LogicException('Resource '.$name.' can not be removed'); |
|
278 | 278 | } |
279 | 279 | } |
280 | 280 |