Passed
Push — master ( f40f88...929445 )
by Vince
01:30
created
src/core/route/router.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/core/throttle/limiter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/core/throttle/limiterOptions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
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']);
Please login to merge, or discard this patch.
src/core/auth/jwtValidate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/core/headers/header.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
         foreach ($headers_list as $index => $headValue) {
193 193
             @list($key, $value) = explode(": ", $headValue);
194 194
             
195
-            if (!is_null($key) && !is_null($value) ) {
195
+            if (!is_null($key) && !is_null($value)) {
196 196
                 $headers_list[$key] = $value;
197 197
                 unset($headers_list[$index]);
198 198
             }
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
             $apacheRequestHeaders = apache_request_headers();
205 205
         }
206 206
 
207
-        if( is_null($apacheRequestHeaders) || empty($apacheRequestHeaders) ) {
207
+        if (is_null($apacheRequestHeaders) || empty($apacheRequestHeaders)) {
208 208
             return [];
209 209
         }
210 210
 
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
             '*',
263 263
         ));
264 264
 
265
-        if( !array_key_exists('Access-Control-Allow-Methods', $this->getHeaders()) ) {
265
+        if (!array_key_exists('Access-Control-Allow-Methods', $this->getHeaders())) {
266 266
             $this->setHeader('Access-Control-Allow-Methods', array(
267 267
                 'GET,POST,OPTIONS',
268 268
             ));
Please login to merge, or discard this patch.
src/core/headers/headerAuth.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     {
78 78
         $auth_headers = $this->getHeaders();
79 79
 
80
-        if( $this->hasBearerValue() ) {
80
+        if ($this->hasBearerValue()) {
81 81
 
82 82
             list($type, $clientToken) = explode(" ", $auth_headers["Authorization"], 2);
83 83
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         $helper = new helper;
100 100
 
101 101
         if (isset($auth_headers["Authorization"]) && !empty($auth_headers["Authorization"])) {
102
-            if( $grantType = $helper->checkVal($_REQUEST, 'grant_type') ) {
102
+            if ($grantType = $helper->checkVal($_REQUEST, 'grant_type')) {
103 103
 
104 104
                 $refreshToken = false;
105 105
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
                     )
145 145
                 );
146 146
 
147
-            if( empty($account) ) {
147
+            if (empty($account)) {
148 148
                 $this->setUnauthorised();
149 149
             }
150 150
 
Please login to merge, or discard this patch.