@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $arguments["channel"] = $channel; |
| 62 | 62 | } |
| 63 | 63 | if ($timestamp != NULL) { |
| 64 | - $arguments["timestamp"] = (float)$timestamp; |
|
| 64 | + $arguments["timestamp"] = (float) $timestamp; |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | $this->setUrl("reactions.add", $arguments); |
@@ -70,14 +70,14 @@ discard block |
||
| 70 | 70 | try { |
| 71 | 71 | $client = new \GuzzleHttp\Client(); |
| 72 | 72 | $json_response = $client->request('GET', $this->getUrl(), []); |
| 73 | - $response = json_decode( $json_response->getBody() ); |
|
| 73 | + $response = json_decode($json_response->getBody()); |
|
| 74 | 74 | } |
| 75 | 75 | catch (RequestException $e) { |
| 76 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
| 76 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | - if($response->{'ok'} === FALSE) { |
|
| 80 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
| 79 | + if ($response->{'ok'} === FALSE) { |
|
| 80 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | return $this; |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | $arguments["channel"] = $channel; |
| 129 | 129 | } |
| 130 | 130 | if ($timestamp != NULL) { |
| 131 | - $arguments["timestamp"] = (string)$timestamp; |
|
| 131 | + $arguments["timestamp"] = (string) $timestamp; |
|
| 132 | 132 | } |
| 133 | 133 | if ($full != NULL) { |
| 134 | 134 | $arguments["full"] = $full; |
@@ -140,14 +140,14 @@ discard block |
||
| 140 | 140 | try { |
| 141 | 141 | $client = new \GuzzleHttp\Client(); |
| 142 | 142 | $json_response = $client->request('GET', $this->getUrl(), []); |
| 143 | - $response = json_decode( $json_response->getBody() ); |
|
| 143 | + $response = json_decode($json_response->getBody()); |
|
| 144 | 144 | } |
| 145 | 145 | catch (RequestException $e) { |
| 146 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
| 146 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
| 147 | 147 | } |
| 148 | 148 | |
| 149 | - if($response->{'ok'} === FALSE) { |
|
| 150 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
| 149 | + if ($response->{'ok'} === FALSE) { |
|
| 150 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | return $json_response->getBody(); |
@@ -187,10 +187,10 @@ discard block |
||
| 187 | 187 | "page" => $page |
| 188 | 188 | ); |
| 189 | 189 | |
| 190 | - if($user != NULL) { |
|
| 190 | + if ($user != NULL) { |
|
| 191 | 191 | $arguments["user"] = $user; |
| 192 | 192 | } |
| 193 | - if($full != NULL) { |
|
| 193 | + if ($full != NULL) { |
|
| 194 | 194 | $arguments["full"] = $full; |
| 195 | 195 | } |
| 196 | 196 | |
@@ -200,14 +200,14 @@ discard block |
||
| 200 | 200 | try { |
| 201 | 201 | $client = new \GuzzleHttp\Client(); |
| 202 | 202 | $json_response = $client->request('GET', $this->getUrl(), []); |
| 203 | - $response = json_decode( $json_response->getBody() ); |
|
| 203 | + $response = json_decode($json_response->getBody()); |
|
| 204 | 204 | } |
| 205 | 205 | catch (RequestException $e) { |
| 206 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
| 206 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
| 207 | 207 | } |
| 208 | 208 | |
| 209 | - if($response->{'ok'} === FALSE) { |
|
| 210 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
| 209 | + if ($response->{'ok'} === FALSE) { |
|
| 210 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
| 211 | 211 | } |
| 212 | 212 | |
| 213 | 213 | return $json_response->getBody(); |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | $arguments["channel"] = $channel; |
| 261 | 261 | } |
| 262 | 262 | if ($timestamp != NULL) { |
| 263 | - $arguments["timestamp"] = (string)$timestamp; |
|
| 263 | + $arguments["timestamp"] = (string) $timestamp; |
|
| 264 | 264 | } |
| 265 | 265 | |
| 266 | 266 | $this->setUrl("reactions.remove", $arguments); |
@@ -269,14 +269,14 @@ discard block |
||
| 269 | 269 | try { |
| 270 | 270 | $client = new \GuzzleHttp\Client(); |
| 271 | 271 | $json_response = $client->request('GET', $this->getUrl(), []); |
| 272 | - $response = json_decode( $json_response->getBody() ); |
|
| 272 | + $response = json_decode($json_response->getBody()); |
|
| 273 | 273 | } |
| 274 | 274 | catch (RequestException $e) { |
| 275 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
| 275 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
| 276 | 276 | } |
| 277 | 277 | |
| 278 | - if($response->{'ok'} === FALSE) { |
|
| 279 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
| 278 | + if ($response->{'ok'} === FALSE) { |
|
| 279 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
| 280 | 280 | } |
| 281 | 281 | |
| 282 | 282 | return $this; |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | * @param string $channel |
| 95 | 95 | * @param float $timestamp |
| 96 | 96 | * @param boolean $full |
| 97 | - * @return Reactions |
|
| 97 | + * @return \Psr\Http\Message\StreamInterface |
|
| 98 | 98 | */ |
| 99 | 99 | public function get($file = NULL, $file_comment = NULL, $channel = NULL, $timestamp = NULL, $full = NULL) { |
| 100 | 100 | |
@@ -161,9 +161,9 @@ discard block |
||
| 161 | 161 | * |
| 162 | 162 | * @param string $user |
| 163 | 163 | * @param boolean $full |
| 164 | - * @param string $count |
|
| 165 | - * @param string $page |
|
| 166 | - * @return Reactions |
|
| 164 | + * @param integer $count |
|
| 165 | + * @param integer $page |
|
| 166 | + * @return \Psr\Http\Message\StreamInterface |
|
| 167 | 167 | */ |
| 168 | 168 | public function list_reactions($user = NULL, $full = NULL, $count = 100, $page = 1) { |
| 169 | 169 | |
@@ -66,14 +66,14 @@ discard block |
||
| 66 | 66 | try { |
| 67 | 67 | $client = new \GuzzleHttp\Client(); |
| 68 | 68 | $json_response = $client->request('GET', $this->getUrl(), []); |
| 69 | - $response = json_decode( $json_response->getBody() ); |
|
| 69 | + $response = json_decode($json_response->getBody()); |
|
| 70 | 70 | } |
| 71 | 71 | catch (RequestException $e) { |
| 72 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
| 72 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | - if($response->{'ok'} === FALSE) { |
|
| 76 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
| 75 | + if ($response->{'ok'} === FALSE) { |
|
| 76 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | return $json_response->getBody(); |
@@ -131,14 +131,14 @@ discard block |
||
| 131 | 131 | try { |
| 132 | 132 | $client = new \GuzzleHttp\Client(); |
| 133 | 133 | $json_response = $client->request('GET', $this->getUrl(), []); |
| 134 | - $response = json_decode( $json_response->getBody() ); |
|
| 134 | + $response = json_decode($json_response->getBody()); |
|
| 135 | 135 | } |
| 136 | 136 | catch (RequestException $e) { |
| 137 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
| 137 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | - if($response->{'ok'} === FALSE) { |
|
| 141 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
| 140 | + if ($response->{'ok'} === FALSE) { |
|
| 141 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | return $json_response->getBody(); |
@@ -196,14 +196,14 @@ discard block |
||
| 196 | 196 | try { |
| 197 | 197 | $client = new \GuzzleHttp\Client(); |
| 198 | 198 | $json_response = $client->request('GET', $this->getUrl(), []); |
| 199 | - $response = json_decode( $json_response->getBody() ); |
|
| 199 | + $response = json_decode($json_response->getBody()); |
|
| 200 | 200 | } |
| 201 | 201 | catch (RequestException $e) { |
| 202 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
| 202 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
| 203 | 203 | } |
| 204 | 204 | |
| 205 | - if($response->{'ok'} === FALSE) { |
|
| 206 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
| 205 | + if ($response->{'ok'} === FALSE) { |
|
| 206 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
| 207 | 207 | } |
| 208 | 208 | |
| 209 | 209 | return $json_response->getBody(); |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | * @param string $description |
| 26 | 26 | * @param string $channels |
| 27 | 27 | * @param bool $include_count |
| 28 | - * @return string |
|
| 28 | + * @return \Psr\Http\Message\StreamInterface |
|
| 29 | 29 | */ |
| 30 | 30 | public function create($name, $handle = NULL, $description = NULL, $channels = NULL, $include_count = NULL) { |
| 31 | 31 | |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | * |
| 92 | 92 | * @param string $usergroup |
| 93 | 93 | * @param bool $include_count |
| 94 | - * @return string |
|
| 94 | + * @return \Psr\Http\Message\StreamInterface |
|
| 95 | 95 | */ |
| 96 | 96 | public function disable($usergroup, $include_count = NULL) { |
| 97 | 97 | |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | * |
| 140 | 140 | * @param string $usergroup |
| 141 | 141 | * @param bool $include_count |
| 142 | - * @return string |
|
| 142 | + * @return \Psr\Http\Message\StreamInterface |
|
| 143 | 143 | */ |
| 144 | 144 | public function enable($usergroup, $include_count = NULL) { |
| 145 | 145 | |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | * @param bool $include_disabled |
| 190 | 190 | * @param bool $include_count |
| 191 | 191 | * @param bool $include_users |
| 192 | - * @return string |
|
| 192 | + * @return \Psr\Http\Message\StreamInterface |
|
| 193 | 193 | */ |
| 194 | 194 | public function list_usergroups($include_disabled = NULL, $include_count = NULL, $include_users = NULL) { |
| 195 | 195 | |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | * @param string $description |
| 249 | 249 | * @param string $channels |
| 250 | 250 | * @param bool $include_count |
| 251 | - * @return string |
|
| 251 | + * @return \Psr\Http\Message\StreamInterface |
|
| 252 | 252 | */ |
| 253 | 253 | public function update($usergroup, $name = NULL, $handle = NULL, $description = NULL, $channels = NULL, $include_count = NULL) { |
| 254 | 254 | |
@@ -320,7 +320,7 @@ discard block |
||
| 320 | 320 | * |
| 321 | 321 | * @param string $usergroup |
| 322 | 322 | * @param bool $include_disabled |
| 323 | - * @return string |
|
| 323 | + * @return \Psr\Http\Message\StreamInterface |
|
| 324 | 324 | */ |
| 325 | 325 | public function usersList($usergroup, $include_disabled = NULL) { |
| 326 | 326 | |
@@ -368,8 +368,7 @@ discard block |
||
| 368 | 368 | * |
| 369 | 369 | * @param string $usergroup |
| 370 | 370 | * @param string $users |
| 371 | - * @param bool $include_count |
|
| 372 | - * @return string |
|
| 371 | + * @return \Psr\Http\Message\StreamInterface |
|
| 373 | 372 | */ |
| 374 | 373 | public function usersUpdate($usergroup, $users, $include_disabled = NULL) { |
| 375 | 374 | |
@@ -33,16 +33,16 @@ discard block |
||
| 33 | 33 | if (!is_string($name) || ($name == NULL)) { |
| 34 | 34 | throw new InvalidArgumentException("The type of the name variable is not valid."); |
| 35 | 35 | } |
| 36 | - if (!is_string($handle) && ($name != NULL)) { |
|
| 36 | + if (!is_string($handle) && ($name != NULL)) { |
|
| 37 | 37 | throw new InvalidArgumentException("The type of the handle variable is not valid."); |
| 38 | 38 | } |
| 39 | - if (!is_string($description) && ($description != NULL)) { |
|
| 39 | + if (!is_string($description) && ($description != NULL)) { |
|
| 40 | 40 | throw new InvalidArgumentException("The type of the description variable is not valid."); |
| 41 | 41 | } |
| 42 | - if (!is_string($channels) && ($channels != NULL)) { |
|
| 42 | + if (!is_string($channels) && ($channels != NULL)) { |
|
| 43 | 43 | throw new InvalidArgumentException("The type of the channels variable is not valid."); |
| 44 | 44 | } |
| 45 | - if (!is_bool($include_count) && ($include_count != NULL)) { |
|
| 45 | + if (!is_bool($include_count) && ($include_count != NULL)) { |
|
| 46 | 46 | throw new InvalidArgumentException("The type of the channels variable is not valid."); |
| 47 | 47 | } |
| 48 | 48 | |
@@ -70,14 +70,14 @@ discard block |
||
| 70 | 70 | try { |
| 71 | 71 | $client = new \GuzzleHttp\Client(); |
| 72 | 72 | $json_response = $client->request('GET', $this->getUrl(), []); |
| 73 | - $response = json_decode( $json_response->getBody() ); |
|
| 73 | + $response = json_decode($json_response->getBody()); |
|
| 74 | 74 | } |
| 75 | 75 | catch (RequestException $e) { |
| 76 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
| 76 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | - if($response->{'ok'} === FALSE) { |
|
| 80 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
| 79 | + if ($response->{'ok'} === FALSE) { |
|
| 80 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | return $json_response->getBody(); |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | if (!is_string($usergroup) || ($usergroup != NULL)) { |
| 100 | 100 | throw new InvalidArgumentException("The type of the usergroup variable is not valid."); |
| 101 | 101 | } |
| 102 | - if (!is_bool($include_count) && ($include_count != NULL)) { |
|
| 102 | + if (!is_bool($include_count) && ($include_count != NULL)) { |
|
| 103 | 103 | throw new InvalidArgumentException("The type of the include_count variable is not valid."); |
| 104 | 104 | } |
| 105 | 105 | |
@@ -118,14 +118,14 @@ discard block |
||
| 118 | 118 | try { |
| 119 | 119 | $client = new \GuzzleHttp\Client(); |
| 120 | 120 | $json_response = $client->request('GET', $this->getUrl(), []); |
| 121 | - $response = json_decode( $json_response->getBody() ); |
|
| 121 | + $response = json_decode($json_response->getBody()); |
|
| 122 | 122 | } |
| 123 | 123 | catch (RequestException $e) { |
| 124 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
| 124 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | - if($response->{'ok'} === FALSE) { |
|
| 128 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
| 127 | + if ($response->{'ok'} === FALSE) { |
|
| 128 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | return $json_response->getBody(); |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | if (!is_string($usergroup) || ($usergroup != NULL)) { |
| 148 | 148 | throw new InvalidArgumentException("The type of the usergroup variable is not valid."); |
| 149 | 149 | } |
| 150 | - if (!is_bool($include_count) && ($include_count != NULL)) { |
|
| 150 | + if (!is_bool($include_count) && ($include_count != NULL)) { |
|
| 151 | 151 | throw new InvalidArgumentException("The type of the include_count variable is not valid."); |
| 152 | 152 | } |
| 153 | 153 | |
@@ -166,14 +166,14 @@ discard block |
||
| 166 | 166 | try { |
| 167 | 167 | $client = new \GuzzleHttp\Client(); |
| 168 | 168 | $json_response = $client->request('GET', $this->getUrl(), []); |
| 169 | - $response = json_decode( $json_response->getBody() ); |
|
| 169 | + $response = json_decode($json_response->getBody()); |
|
| 170 | 170 | } |
| 171 | 171 | catch (RequestException $e) { |
| 172 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
| 172 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
| 173 | 173 | } |
| 174 | 174 | |
| 175 | - if($response->{'ok'} === FALSE) { |
|
| 176 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
| 175 | + if ($response->{'ok'} === FALSE) { |
|
| 176 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | return $json_response->getBody(); |
@@ -194,13 +194,13 @@ discard block |
||
| 194 | 194 | public function list_usergroups($include_disabled = NULL, $include_count = NULL, $include_users = NULL) { |
| 195 | 195 | |
| 196 | 196 | // Check if the type of the variables is valid. |
| 197 | - if (!is_bool($include_disabled) && ($include_disabled != NULL)) { |
|
| 197 | + if (!is_bool($include_disabled) && ($include_disabled != NULL)) { |
|
| 198 | 198 | throw new InvalidArgumentException("The type of the include_disabled variable is not valid."); |
| 199 | 199 | } |
| 200 | - if (!is_bool($include_count) && ($include_count != NULL)) { |
|
| 200 | + if (!is_bool($include_count) && ($include_count != NULL)) { |
|
| 201 | 201 | throw new InvalidArgumentException("The type of the include_count variable is not valid."); |
| 202 | 202 | } |
| 203 | - if (!is_bool($include_users) && ($include_users != NULL)) { |
|
| 203 | + if (!is_bool($include_users) && ($include_users != NULL)) { |
|
| 204 | 204 | throw new InvalidArgumentException("The type of the include_users variable is not valid."); |
| 205 | 205 | } |
| 206 | 206 | |
@@ -223,14 +223,14 @@ discard block |
||
| 223 | 223 | try { |
| 224 | 224 | $client = new \GuzzleHttp\Client(); |
| 225 | 225 | $json_response = $client->request('GET', $this->getUrl(), []); |
| 226 | - $response = json_decode( $json_response->getBody() ); |
|
| 226 | + $response = json_decode($json_response->getBody()); |
|
| 227 | 227 | } |
| 228 | 228 | catch (RequestException $e) { |
| 229 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
| 229 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
| 230 | 230 | } |
| 231 | 231 | |
| 232 | - if($response->{'ok'} === FALSE) { |
|
| 233 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
| 232 | + if ($response->{'ok'} === FALSE) { |
|
| 233 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
| 234 | 234 | } |
| 235 | 235 | |
| 236 | 236 | return $json_response->getBody(); |
@@ -259,16 +259,16 @@ discard block |
||
| 259 | 259 | if (!is_string($name) && ($name != NULL)) { |
| 260 | 260 | throw new InvalidArgumentException("The type of the name variable is not valid."); |
| 261 | 261 | } |
| 262 | - if (!is_string($handle) && ($name != NULL)) { |
|
| 262 | + if (!is_string($handle) && ($name != NULL)) { |
|
| 263 | 263 | throw new InvalidArgumentException("The type of the handle variable is not valid."); |
| 264 | 264 | } |
| 265 | - if (!is_string($description) && ($description != NULL)) { |
|
| 265 | + if (!is_string($description) && ($description != NULL)) { |
|
| 266 | 266 | throw new InvalidArgumentException("The type of the description variable is not valid."); |
| 267 | 267 | } |
| 268 | - if (!is_string($channels) && ($channels != NULL)) { |
|
| 268 | + if (!is_string($channels) && ($channels != NULL)) { |
|
| 269 | 269 | throw new InvalidArgumentException("The type of the channels variable is not valid."); |
| 270 | 270 | } |
| 271 | - if (!is_bool($include_count) && ($include_count != NULL)) { |
|
| 271 | + if (!is_bool($include_count) && ($include_count != NULL)) { |
|
| 272 | 272 | throw new InvalidArgumentException("The type of the include_count variable is not valid."); |
| 273 | 273 | } |
| 274 | 274 | |
@@ -299,14 +299,14 @@ discard block |
||
| 299 | 299 | try { |
| 300 | 300 | $client = new \GuzzleHttp\Client(); |
| 301 | 301 | $json_response = $client->request('GET', $this->getUrl(), []); |
| 302 | - $response = json_decode( $json_response->getBody() ); |
|
| 302 | + $response = json_decode($json_response->getBody()); |
|
| 303 | 303 | } |
| 304 | 304 | catch (RequestException $e) { |
| 305 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
| 305 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
| 306 | 306 | } |
| 307 | 307 | |
| 308 | - if($response->{'ok'} === FALSE) { |
|
| 309 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
| 308 | + if ($response->{'ok'} === FALSE) { |
|
| 309 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
| 310 | 310 | } |
| 311 | 311 | |
| 312 | 312 | return $json_response->getBody(); |
@@ -328,7 +328,7 @@ discard block |
||
| 328 | 328 | if (!is_string($usergroup) || ($usergroup == NULL)) { |
| 329 | 329 | throw new InvalidArgumentException("The type of the usergroup variable is not valid."); |
| 330 | 330 | } |
| 331 | - if (!is_bool($include_disabled) && ($include_disabled != NULL)) { |
|
| 331 | + if (!is_bool($include_disabled) && ($include_disabled != NULL)) { |
|
| 332 | 332 | throw new InvalidArgumentException("The type of the include_disabled variable is not valid."); |
| 333 | 333 | } |
| 334 | 334 | |
@@ -347,14 +347,14 @@ discard block |
||
| 347 | 347 | try { |
| 348 | 348 | $client = new \GuzzleHttp\Client(); |
| 349 | 349 | $json_response = $client->request('GET', $this->getUrl(), []); |
| 350 | - $response = json_decode( $json_response->getBody() ); |
|
| 350 | + $response = json_decode($json_response->getBody()); |
|
| 351 | 351 | } |
| 352 | 352 | catch (RequestException $e) { |
| 353 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
| 353 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
| 354 | 354 | } |
| 355 | 355 | |
| 356 | - if($response->{'ok'} === FALSE) { |
|
| 357 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
| 356 | + if ($response->{'ok'} === FALSE) { |
|
| 357 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
| 358 | 358 | } |
| 359 | 359 | |
| 360 | 360 | return $json_response->getBody(); |
@@ -380,7 +380,7 @@ discard block |
||
| 380 | 380 | if (!is_string($users) || ($users == NULL)) { |
| 381 | 381 | throw new InvalidArgumentException("The type of the users variable is not valid."); |
| 382 | 382 | } |
| 383 | - if (!is_bool($include_count) && ($include_count != NULL)) { |
|
| 383 | + if (!is_bool($include_count) && ($include_count != NULL)) { |
|
| 384 | 384 | throw new InvalidArgumentException("The type of the include_count variable is not valid."); |
| 385 | 385 | } |
| 386 | 386 | |
@@ -400,14 +400,14 @@ discard block |
||
| 400 | 400 | try { |
| 401 | 401 | $client = new \GuzzleHttp\Client(); |
| 402 | 402 | $json_response = $client->request('GET', $this->getUrl(), []); |
| 403 | - $response = json_decode( $json_response->getBody() ); |
|
| 403 | + $response = json_decode($json_response->getBody()); |
|
| 404 | 404 | } |
| 405 | 405 | catch (RequestException $e) { |
| 406 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
| 406 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
| 407 | 407 | } |
| 408 | 408 | |
| 409 | - if($response->{'ok'} === FALSE) { |
|
| 410 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
| 409 | + if ($response->{'ok'} === FALSE) { |
|
| 410 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
| 411 | 411 | } |
| 412 | 412 | |
| 413 | 413 | return $json_response->getBody(); |
@@ -30,14 +30,14 @@ |
||
| 30 | 30 | try { |
| 31 | 31 | $client = new \GuzzleHttp\Client(); |
| 32 | 32 | $json_response = $client->request('GET', $this->getUrl(), []); |
| 33 | - $response = json_decode( $json_response->getBody() ); |
|
| 33 | + $response = json_decode($json_response->getBody()); |
|
| 34 | 34 | } |
| 35 | 35 | catch (RequestException $e) { |
| 36 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
| 36 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | - if($response->{'ok'} === FALSE) { |
|
| 40 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
| 39 | + if ($response->{'ok'} === FALSE) { |
|
| 40 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | return $json_response->getBody(); |
@@ -30,14 +30,14 @@ |
||
| 30 | 30 | try { |
| 31 | 31 | $client = new \GuzzleHttp\Client(); |
| 32 | 32 | $json_response = $client->request('GET', $this->getUrl(), []); |
| 33 | - $response = json_decode( $json_response->getBody() ); |
|
| 33 | + $response = json_decode($json_response->getBody()); |
|
| 34 | 34 | } |
| 35 | 35 | catch (RequestException $e) { |
| 36 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
| 36 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | - if($response->{'ok'} === FALSE) { |
|
| 40 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
| 39 | + if ($response->{'ok'} === FALSE) { |
|
| 40 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | return $json_response->getBody(); |