Passed
Push — master ( 3985de...9157a0 )
by Vince
01:47
created
src/core/keys/key.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      */
36 36
     public function apiKeyGenerate($length = 32)
37 37
     {
38
-        $randInt = microtime().rand(1000, 9999);
38
+        $randInt = microtime() . rand(1000, 9999);
39 39
         $messageDigest = md5($randInt);
40 40
         return implode(
41 41
             '-',
Please login to merge, or discard this patch.
src/core/throttle/tokenBucket.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -215,7 +215,7 @@
 block discarded – undo
215 215
                 if ($nLeakRate < 0) {
216 216
                     $nLeakRate = 0;
217 217
                 }
218
-                $this->leakage = (float)$nLeakRate;
218
+                $this->leakage = (float) $nLeakRate;
219 219
             }
220 220
         }
221 221
 
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/throttle/limiter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
             $bucket->getTokenData()
212 212
         );
213 213
 
214
-        if($this->isMockTest) {
214
+        if ($this->isMockTest) {
215 215
             return;
216 216
         }
217 217
         
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
      */
258 258
     public function getAccount()
259 259
     {
260
-        if($this->isMockTest) {
260
+        if ($this->isMockTest) {
261 261
             $this->getMockAccount();
262 262
         }
263 263
 
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 
282 282
         $mockAccount = [];
283 283
 
284
-        if(!isset($mockAccount['bucket'])) {
284
+        if (!isset($mockAccount['bucket'])) {
285 285
             $mockAccount['bucket'] = $packer->pack(
286 286
                 $bucket->getTokenData()
287 287
             );
@@ -289,8 +289,8 @@  discard block
 block discarded – undo
289 289
 
290 290
         $mockAccount['access'] = time();
291 291
 
292
-        $this->setAccount((object)$mockAccount);
293
-        $this->mockAccount = (object)$mockAccount;
292
+        $this->setAccount((object) $mockAccount);
293
+        $this->mockAccount = (object) $mockAccount;
294 294
     }
295 295
 
296 296
     /**
Please login to merge, or discard this patch.
src/core/auth/jwtDecoder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
         $payloadObject = $cipher->jsonDecode($cipher->decode($jwtPayload));
52 52
 
53 53
         // @codeCoverageIgnoreStart
54
-        if( $this->key == 'payloadOnly' ) {
54
+        if ($this->key == 'payloadOnly') {
55 55
             return $payloadObject;
56 56
         }
57 57
         // @codeCoverageIgnoreEnd
Please login to merge, or discard this patch.
src/core/auth/jwt.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
      * @var array
53 53
      */
54 54
     protected static $ALGORITHMS = [
55
-        'HS256','sha256',
56
-        'HS384','sha384',
57
-        'HS512','sha512',
55
+        'HS256', 'sha256',
56
+        'HS384', 'sha384',
57
+        'HS512', 'sha512',
58 58
     ];
59 59
 
60 60
     /**
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
      * [getOptions]
253 253
      * @return array
254 254
      */
255
-    public function getOptions():?array
255
+    public function getOptions(): ?array
256 256
     {
257 257
         return self::$options;
258 258
     }
Please login to merge, or discard this patch.
src/core/headers/headerVerbs.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -156,8 +156,8 @@
 block discarded – undo
156 156
     public static function getRequestVerb():string
157 157
     {
158 158
         $helper = new helper;
159
-        $method = $helper->checkVal(@$_SERVER, 'REQUEST_METHOD', '' );
160
-        $method = $helper->checkVal(@$_SERVER, 'HTTP_X_HTTP_METHOD', $method );
159
+        $method = $helper->checkVal(@$_SERVER, 'REQUEST_METHOD', '');
160
+        $method = $helper->checkVal(@$_SERVER, 'HTTP_X_HTTP_METHOD', $method);
161 161
 
162 162
         return strtolower($method);
163 163
     }
Please login to merge, or discard this patch.
src/core/exception/errorException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@
 block discarded – undo
157 157
         
158 158
         $headers = new headers\header;
159 159
         $headers->setOptions($options);
160
-        $headers->setHeaders($corsAllowed&&$isCorsRequest);
160
+        $headers->setHeaders($corsAllowed && $isCorsRequest);
161 161
 
162 162
         http_response_code($this->ERROR_STATE['ERROR_CODE']);
163 163
 
Please login to merge, or discard this patch.