@@ -30,10 +30,10 @@ |
||
30 | 30 | */ |
31 | 31 | public static function get(array $setting): MessengerInterface |
32 | 32 | { |
33 | - $apiKey = $setting['config']['api_key'] ?? ''; |
|
33 | + $apiKey = $setting['config']['api_key'] ?? ''; |
|
34 | 34 | $domain = $setting['config']['domain_name'] ?? ''; |
35 | - $sender = $setting['config']['sender'] ?? ''; |
|
36 | - $recipients = $setting['config']['recipients'] ?? []; |
|
35 | + $sender = $setting['config']['sender'] ?? ''; |
|
36 | + $recipients = $setting['config']['recipients'] ?? []; |
|
37 | 37 | |
38 | 38 | $instance = new Mailgun($apiKey, $domain); |
39 | 39 | $instance->setSubject(__('core', 'messenger_text_mail_subject')); |
@@ -30,11 +30,11 @@ |
||
30 | 30 | */ |
31 | 31 | public static function get(array $setting): MessengerInterface |
32 | 32 | { |
33 | - $sender = $setting['config']['sender'] ?? ''; |
|
33 | + $sender = $setting['config']['sender'] ?? ''; |
|
34 | 34 | $recipients = $setting['config']['recipients'] ?? []; |
35 | - $host = $setting['config']['host'] ?? ''; |
|
36 | - $user = $setting['config']['user'] ?? ''; |
|
37 | - $pass = $setting['config']['pass'] ?? ''; |
|
35 | + $host = $setting['config']['host'] ?? ''; |
|
36 | + $user = $setting['config']['user'] ?? ''; |
|
37 | + $pass = $setting['config']['pass'] ?? ''; |
|
38 | 38 | $port = $setting['config']['port'] ?? ''; |
39 | 39 | |
40 | 40 | $instance = new Smtp($user, $pass, $host, (int) $port); |
@@ -30,7 +30,7 @@ |
||
30 | 30 | */ |
31 | 31 | public static function get(array $setting): MessengerInterface |
32 | 32 | { |
33 | - $sender = $setting['config']['sender'] ?? ''; |
|
33 | + $sender = $setting['config']['sender'] ?? ''; |
|
34 | 34 | $recipients = $setting['config']['recipients'] ?? []; |
35 | 35 | |
36 | 36 | $instance = new Mail(); |
@@ -29,10 +29,10 @@ |
||
29 | 29 | */ |
30 | 30 | public static function get(array $setting): MessengerInterface |
31 | 31 | { |
32 | - $serverUrl = $setting['config']['server_url'] ?? ''; |
|
33 | - $userId = $setting['config']['user_id'] ?? ''; |
|
32 | + $serverUrl = $setting['config']['server_url'] ?? ''; |
|
33 | + $userId = $setting['config']['user_id'] ?? ''; |
|
34 | 34 | $accessToken = $setting['config']['access_token'] ?? ''; |
35 | - $channel = $setting['config']['channel'] ?? ''; |
|
35 | + $channel = $setting['config']['channel'] ?? ''; |
|
36 | 36 | |
37 | 37 | return new RocketChat($accessToken, $userId, $serverUrl, $channel); |
38 | 38 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | // Create a PDO instance. |
38 | 38 | $pdoInstance = new PDO( |
39 | 39 | 'mysql:host=' |
40 | - . $setting['host'] . ';dbname=' |
|
40 | + . $setting['host'] . ';dbname=' |
|
41 | 41 | . $setting['dbname'] . ';charset=' |
42 | 42 | . $setting['charset'] |
43 | 43 | , (string) $setting['user'] |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | // @codeCoverageIgnoreStart |
51 | 51 | |
52 | - } catch(PDOException $e) { |
|
52 | + } catch (PDOException $e) { |
|
53 | 53 | echo $e->getMessage(); |
54 | 54 | } |
55 | 55 |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | <div class="card-body"> |
120 | 120 | <form action="<?php echo $form ?>" method="post" autocomplete="off"> |
121 | 121 | <div class="main-content"> |
122 | - <?php if (! empty($error)) : ?> |
|
122 | + <?php if (!empty($error)) : ?> |
|
123 | 123 | <div class="error-notice"> |
124 | 124 | <?php echo $error; ?> |
125 | 125 | </div> |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | <div class="input-box"> |
131 | 131 | <input type="password" name="s_pass" placeholder="Password" class="form-input" /> |
132 | 132 | </div> |
133 | - <?php if (! empty($captchas)) : ?> |
|
133 | + <?php if (!empty($captchas)) : ?> |
|
134 | 134 | <div class="input-box"> |
135 | 135 | <?php foreach ($captchas as $captcha) : ?> |
136 | 136 | <?php echo $captcha->form(); ?> |
@@ -22,7 +22,7 @@ |
||
22 | 22 | */ |
23 | 23 | trait SessionTrait |
24 | 24 | { |
25 | - /** |
|
25 | + /** |
|
26 | 26 | * Are you willing to limit the online session amount? |
27 | 27 | * |
28 | 28 | * @var array |
@@ -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 | ]; |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | 'colors' => [ |
101 | 101 | 'background' => [255, 255, 255], |
102 | 102 | 'border' => [153, 200, 255], |
103 | - 'text' => [51, 153, 255], |
|
103 | + 'text' => [51, 153, 255], |
|
104 | 104 | 'grid' => [153, 200, 255] |
105 | 105 | ] |
106 | 106 | ]; |
@@ -319,14 +319,12 @@ discard block |
||
319 | 319 | { |
320 | 320 | // Determine angle and position. |
321 | 321 | $angle = ($this->length >= 6) ? |
322 | - mt_rand(-($this->length - 6), ($this->length - 6)) : |
|
323 | - 0; |
|
322 | + mt_rand(-($this->length - 6), ($this->length - 6)) : 0; |
|
324 | 323 | |
325 | 324 | $xAxis = mt_rand(6, (360 / $this->length) - 16); |
326 | 325 | |
327 | 326 | $yAxis = ($angle >= 0) ? |
328 | - mt_rand($imgHeight, $imgWidth) : |
|
329 | - mt_rand(6, $imgHeight); |
|
327 | + mt_rand($imgHeight, $imgWidth) : mt_rand(6, $imgHeight); |
|
330 | 328 | |
331 | 329 | // Create the spiral pattern. |
332 | 330 | $theta = 1; |
@@ -369,7 +367,7 @@ discard block |
||
369 | 367 | $y = 0; |
370 | 368 | |
371 | 369 | for ($i = 0; $i < $this->length; $i++) { |
372 | - $y = mt_rand(0 , $imgHeight / 2); |
|
370 | + $y = mt_rand(0, $imgHeight / 2); |
|
373 | 371 | imagestring($this->im, 5, $x, $y, $this->word[$i], $textColor); |
374 | 372 | $x += ($this->properties['font_spacing'] * 2); |
375 | 373 | } |
@@ -398,7 +396,7 @@ discard block |
||
398 | 396 | private function getImageBase64Content(): string |
399 | 397 | { |
400 | 398 | // Generate image in base64 string. |
401 | - ob_start (); |
|
399 | + ob_start(); |
|
402 | 400 | |
403 | 401 | if (function_exists('imagejpeg')) { |
404 | 402 | $this->imageType = 'jpeg'; |