@@ -208,7 +208,7 @@ discard block |
||
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 |
||
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 | ]; |
@@ -266,14 +266,12 @@ discard block |
||
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 |
||
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 |
||
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'; |