@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | 'post' => $payload |
96 | 96 | ]; |
97 | 97 | |
98 | - if( isset($this->requestBody['payload']) ) { |
|
98 | + if (isset($this->requestBody['payload'])) { |
|
99 | 99 | array_merge($this->requestBody['payload'], $payloadPost); |
100 | 100 | return; |
101 | 101 | } |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | */ |
121 | 121 | public function getRequestBody() |
122 | 122 | { |
123 | - if( isset($this->requestBody['payload']) ) { |
|
123 | + if (isset($this->requestBody['payload'])) { |
|
124 | 124 | return $this->requestBody['payload']; |
125 | 125 | } |
126 | 126 | return $this->requestBody; |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | ), |
173 | 173 | ); |
174 | 174 | |
175 | - $this->setRoutes((object)$routesArray); |
|
175 | + $this->setRoutes((object) $routesArray); |
|
176 | 176 | |
177 | 177 | return $this->getRoutes(); |
178 | 178 | } |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | $bucket->getTokenData() |
211 | 211 | ); |
212 | 212 | |
213 | - if($this->isMockTest) { |
|
213 | + if ($this->isMockTest) { |
|
214 | 214 | return; |
215 | 215 | } |
216 | 216 | |
@@ -254,12 +254,12 @@ discard block |
||
254 | 254 | */ |
255 | 255 | public function getAccount() |
256 | 256 | { |
257 | - if($this->isMockTest) { |
|
257 | + if ($this->isMockTest) { |
|
258 | 258 | $this->getMockAccount(); |
259 | 259 | return $this->mockAccount; |
260 | 260 | } |
261 | 261 | |
262 | - if (is_null($this->account)||empty($this->account)) { |
|
262 | + if (is_null($this->account) || empty($this->account)) { |
|
263 | 263 | (new exception\errorException) |
264 | 264 | ->setOptions($this->getOptions()) |
265 | 265 | ->error('UNAUTHORIZED'); |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | |
281 | 281 | $mockAccount = []; |
282 | 282 | |
283 | - if(!isset($mockAccount['bucket'])) { |
|
283 | + if (!isset($mockAccount['bucket'])) { |
|
284 | 284 | $mockAccount['bucket'] = $packer->pack( |
285 | 285 | $bucket->getTokenData() |
286 | 286 | ); |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | |
289 | 289 | $mockAccount['access'] = time(); |
290 | 290 | |
291 | - $this->mockAccount = (object)$mockAccount; |
|
291 | + $this->mockAccount = (object) $mockAccount; |
|
292 | 292 | } |
293 | 293 | |
294 | 294 | /** |
@@ -138,7 +138,7 @@ |
||
138 | 138 | |
139 | 139 | if (is_numeric($timeframe)) { |
140 | 140 | if ($timeframe < 0) { |
141 | - $timeframe = ($timeframe*-1); |
|
141 | + $timeframe = ($timeframe * -1); |
|
142 | 142 | } |
143 | 143 | self::$timeframe['CUSTOM'] = $timeframe; |
144 | 144 | $this->window = intval(self::$timeframe['CUSTOM']); |
@@ -66,7 +66,7 @@ |
||
66 | 66 | */ |
67 | 67 | public static function payload(array $payloadObject = []) |
68 | 68 | { |
69 | - if( self::isAnonymousScope($payloadObject) ) { |
|
69 | + if (self::isAnonymousScope($payloadObject)) { |
|
70 | 70 | return true; |
71 | 71 | } |
72 | 72 |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | foreach ($headers_list as $index => $headValue) { |
187 | 187 | @list($key, $value) = explode(": ", $headValue); |
188 | 188 | |
189 | - if (!is_null($key) && !is_null($value) ) { |
|
189 | + if (!is_null($key) && !is_null($value)) { |
|
190 | 190 | $headers_list[$key] = $value; |
191 | 191 | unset($headers_list[$index]); |
192 | 192 | } |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | $apacheRequestHeaders = apache_request_headers(); |
199 | 199 | } |
200 | 200 | |
201 | - if( is_null($apacheRequestHeaders) || empty($apacheRequestHeaders) ) { |
|
201 | + if (is_null($apacheRequestHeaders) || empty($apacheRequestHeaders)) { |
|
202 | 202 | return []; |
203 | 203 | } |
204 | 204 | |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | '*', |
257 | 257 | )); |
258 | 258 | |
259 | - if( !array_key_exists('Access-Control-Allow-Methods', $this->getHeaders()) ) { |
|
259 | + if (!array_key_exists('Access-Control-Allow-Methods', $this->getHeaders())) { |
|
260 | 260 | $this->setHeader('Access-Control-Allow-Methods', array( |
261 | 261 | 'GET,POST,OPTIONS', |
262 | 262 | )); |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | { |
384 | 384 | $helper = new helper; |
385 | 385 | |
386 | - if( $grantType = $helper->checkVal($_REQUEST, 'grant_type') ) { |
|
386 | + if ($grantType = $helper->checkVal($_REQUEST, 'grant_type')) { |
|
387 | 387 | |
388 | 388 | $refreshToken = false; |
389 | 389 | |
@@ -465,7 +465,7 @@ discard block |
||
465 | 465 | ) |
466 | 466 | ); |
467 | 467 | |
468 | - if( empty($account) ) { |
|
468 | + if (empty($account)) { |
|
469 | 469 | $this->unauthorised(); |
470 | 470 | } |
471 | 471 |