Passed
Push — 2.x ( ba8268...1f390b )
by Terry
02:18
created
src/Firewall/Kernel.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
      * 
209 209
      * @return void
210 210
      */
211
-    public function __construct(?ServerRequestInterface $request  = null, ?ResponseInterface $response = null)
211
+    public function __construct(?ServerRequestInterface $request = null, ?ResponseInterface $response = null)
212 212
     {
213 213
         // Load helper functions. This is the must.
214 214
         new Helpers();
@@ -658,9 +658,9 @@  discard block
 block discarded – undo
658 658
         $this->initComponents();
659 659
 
660 660
         $processMethods = [
661
-            'isRuleExist',   // Stage 1 - Looking for rule table.
662
-            'isTrustedBot',  // Stage 2 - Detect popular search engine.
663
-            'isFakeRobot',   // Stage 3 - Reject fake search engine crawlers.
661
+            'isRuleExist', // Stage 1 - Looking for rule table.
662
+            'isTrustedBot', // Stage 2 - Detect popular search engine.
663
+            'isFakeRobot', // Stage 3 - Reject fake search engine crawlers.
664 664
             'isIpComponent', // Stage 4 - IP manager.
665 665
             'isComponents'   // Stage 5 - Check other components.
666 666
         ];
Please login to merge, or discard this patch.
src/Firewall/Captcha/ImageCaptcha.php 1 patch
Spacing   +4 added lines, -6 removed lines patch added patch discarded remove patch
@@ -266,14 +266,12 @@  discard block
 block discarded – undo
266 266
     {
267 267
         // Determine angle and position.
268 268
         $angle = ($this->length >= 6) ?
269
-            mt_rand(-($this->length - 6), ($this->length - 6)) :
270
-            0;
269
+            mt_rand(-($this->length - 6), ($this->length - 6)) : 0;
271 270
 
272 271
         $xAxis = mt_rand(6, (360 / $this->length) - 16);
273 272
 
274 273
         $yAxis = ($angle >= 0) ?
275
-            mt_rand($imgHeight, $imgWidth) :
276
-            mt_rand(6, $imgHeight);
274
+            mt_rand($imgHeight, $imgWidth) : mt_rand(6, $imgHeight);
277 275
 
278 276
         // Create the spiral pattern.
279 277
         $theta = 1;
@@ -316,7 +314,7 @@  discard block
 block discarded – undo
316 314
         $y = 0;
317 315
 
318 316
         for ($i = 0; $i < $this->length; $i++) {
319
-            $y = mt_rand(0 , $imgHeight / 2);
317
+            $y = mt_rand(0, $imgHeight / 2);
320 318
             imagestring($this->im, 5, $x, $y, $this->word[$i], $textColor);
321 319
             $x += ($this->properties['font_spacing'] * 2);
322 320
         }
@@ -345,7 +343,7 @@  discard block
 block discarded – undo
345 343
     private function getImageBase64Content(): string
346 344
     {
347 345
         // Generate image in base64 string.
348
-        ob_start ();
346
+        ob_start();
349 347
 
350 348
         if (function_exists('imagejpeg')) {
351 349
             $this->imageType = 'jpeg';
Please login to merge, or discard this patch.