Passed
Push — master ( e2906b...45ca24 )
by Murilo
01:42
created
Web/Frontend/views/theme/account/account.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -106,9 +106,12 @@  discard block
 block discarded – undo
106 106
                     <h2 class="pointered noselect" onclick="clearNewFoneInput(); showModal('addNumber');">Adicionar telefone...</h2>
107 107
                 </div>
108 108
             </div>
109
-        <?php else: ?>
109
+        <?php else {
110
+    : ?>
110 111
             <?php foreach ($userData->phone as $key => $value): ?>
111
-                <div class="col-12 bordered bordered-line-top pointered" id="foneRow" onclick="changeFoneInput('<?= $value->number; ?>', <?= $value->id; ?>); showModal('alterNumber');">
112
+                <div class="col-12 bordered bordered-line-top pointered" id="foneRow" onclick="changeFoneInput('<?= $value->number;
113
+}
114
+?>', <?= $value->id; ?>); showModal('alterNumber');">
112 115
                     <div class="bordered-content bordered-align-left" id="foneHeader">
113 116
                         <h2>Telefone <span id="foneIndex"><?= ($key + 1); ?></span></h2>
114 117
                     </div>
@@ -137,11 +140,14 @@  discard block
 block discarded – undo
137 140
                     <h2 class="pointered noselect" onclick="clearNewAddressInputs(); showModal('addAddress');">Adicionar endereço...</h2>
138 141
                 </div>
139 142
             </div>
140
-        <?php else: ?>
143
+        <?php else {
144
+    : ?>
141 145
             <?php foreach ($userData->address as $key => $value): ?>
142 146
                 <div class="col-12 bordered bordered-line-top pointered" id="addressRow" onclick="changeAlterAddressInputs(<?= $value->id ?>); showModal('alterAddress');">
143 147
                     <div class="bordered-content bordered-align-left">
144
-                        <h2><strong>Endereço <?= ($key + 1); ?></strong></h2>
148
+                        <h2><strong>Endereço <?= ($key + 1);
149
+}
150
+?></strong></h2>
145 151
                         <h2>Cidade, Estado</h2>
146 152
                         <h2>CEP</h2>
147 153
                         <h2>Rua</h2>
Please login to merge, or discard this patch.
Web/Frontend/views/theme/products/products-details.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,12 +83,15 @@
 block discarded – undo
83 83
     <div class="row">
84 84
         <h2 class="title" style="margin-top: 50px; margin-bottom: 120px;">No products related!</h2>
85 85
     </div>
86
-<?php else: ?>
86
+<?php else {
87
+    : ?>
87 88
     <div class="small-container">
88 89
         <div class="row">
89 90
             <?php foreach ($relatedProducts as $product): ?>
90 91
                 <div class="col-4">
91
-                    <a href="<?= url("/product/{$product->id}"); ?>"><img src="<?= productImage($product); ?>" class="big-img" alt="produto1"></a>
92
+                    <a href="<?= url("/product/{$product->id}");
93
+}
94
+?>"><img src="<?= productImage($product); ?>" class="big-img" alt="produto1"></a>
92 95
                     <a href="<?= url("/product/{$product->id}"); ?>"><h4><?= str_limit_chars($product->name, 30); ?></h4></a>
93 96
                     <div class="rating">
94 97
                         <?= starRate($product->rate); ?>
Please login to merge, or discard this patch.
Web/Frontend/views/theme/checkout/select-address.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,11 +56,14 @@
 block discarded – undo
56 56
             </div>
57 57
         </div>
58 58
 
59
-    <?php else: ?>
59
+    <?php else {
60
+    : ?>
60 61
         <?php foreach ($userData->address as $key => $value): ?>
61 62
             <div class="col-12 bordered bordered-line-top pointered" id="addressRow" onclick="changeAlterAddressInputs(<?= $value->id ?>); showModal('alterAddress');">
62 63
                 <div class="bordered-content bordered-align-left">
63
-                    <h2><strong>Endereço <?= ($key + 1); ?></strong></h2>
64
+                    <h2><strong>Endereço <?= ($key + 1);
65
+}
66
+?></strong></h2>
64 67
                     <h2>Cidade, Estado</h2>
65 68
                     <h2>CEP</h2>
66 69
                     <h2>Rua</h2>
Please login to merge, or discard this patch.
Web/Frontend/source/Boot/Helpers.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 }
7 7
 
8 8
 function site(string $param = null): string {
9
-    if($param && !empty(SITE[$param])) {
9
+    if ($param && !empty(SITE[$param])) {
10 10
         return SITE[$param];
11 11
     }
12 12
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 }
41 41
 
42 42
 function flash(string $type = null, string $message = null): ?string {
43
-    if($type && $message) {
43
+    if ($type && $message) {
44 44
         $_SESSION['flash'] = [
45 45
             'type' => $type,
46 46
             'message' => $message
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         return null;
49 49
     }
50 50
 
51
-    if(!empty($_SESSION['flash']) && $flash = $_SESSION['flash']) {
51
+    if (!empty($_SESSION['flash']) && $flash = $_SESSION['flash']) {
52 52
         unset($_SESSION['flash']);
53 53
         return "<div class=\"message {$flash["type"]}\">{$flash["message"]}</div>";
54 54
     }
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
     curl_close($curl);
174 174
 
175 175
     if ($curlError) {
176
-        return [ 'curl_error' => $curlError ];
176
+        return ['curl_error' => $curlError];
177 177
     }
178 178
 
179 179
     return [
Please login to merge, or discard this patch.
API/API/index.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,8 +91,7 @@
 block discarded – undo
91 91
  */
92 92
 try {
93 93
     $route->dispatch();
94
-} 
95
-catch (\Throwable $throwable) {
94
+} catch (\Throwable $throwable) {
96 95
     $Message = new stdClass();
97 96
     $Message->status = '500 ' . HTTP_500;
98 97
     $Message->message = $throwable->getMessage();
Please login to merge, or discard this patch.
API/API/source/Controllers/Products.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -77,12 +77,10 @@  discard block
 block discarded – undo
77 77
             if (!empty($data['filterColumn'])) {
78 78
                 if (!empty($data['selfId'])) {
79 79
                     $find = $Product->find("{$data['filterColumn']} = {$data['filterValue']} AND id != {$data['selfId']}");
80
-                }
81
-                else {
80
+                } else {
82 81
                     $find = $Product->find("{$data['filterColumn']} = {$data['filterValue']}");
83 82
                 }
84
-            }
85
-            else {
83
+            } else {
86 84
                 $find = $Product->find();
87 85
             }
88 86
 
@@ -255,8 +253,7 @@  discard block
 block discarded – undo
255 253
 
256 254
         try {
257 255
             $base64 = getimagesizefromstring(base64_decode(explode(',', $base64Image)[1]));
258
-        }
259
-        catch (\Exception $e) {
256
+        } catch (\Exception $e) {
260 257
             $this->Message->message = 'imagem invalida';
261 258
             (new Response())->setStatusCode(HTTP_BAD_REQUEST)->send($this->Message);
262 259
         }
Please login to merge, or discard this patch.
Mailler/App/source/Email/Email.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -100,8 +100,7 @@
 block discarded – undo
100 100
             }
101 101
 
102 102
             return true;
103
-        }
104
-        catch (\Exception $e) {
103
+        } catch (\Exception $e) {
105 104
             \writeLog($e->getMessage());
106 105
             \writeLog($this->mail->ErrorInfo);
107 106
 
Please login to merge, or discard this patch.
Mailler/App/source/Listener.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
 
62 62
             switch ($message->type) {
63 63
                 case 'confirmEmail':
64
-                    $Email = new Email([ $message->content->email ], true);
64
+                    $Email = new Email([$message->content->email], true);
65 65
 
66 66
                     if (!$Email->SendMail(ConfirmEmail::bind('127.0.0.1:80/confirm'), 'Confirm your email')) {
67 67
                         \writeLog('Confirm email not delivered for: ', $message->content->email);
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -73,12 +73,10 @@
 block discarded – undo
73 73
 
74 74
                 default: \writeLog(json_encode($message)); $handledMessage = true; break;
75 75
             }
76
-        }
77
-        catch (\Throwable $exception) {
76
+        } catch (\Throwable $exception) {
78 77
             \writeLog($exception->getMessage());
79 78
             $handledMessage = true;
80
-        }
81
-        finally {
79
+        } finally {
82 80
             /**
83 81
              * Verify if the message are received and if yes, send the ack for the queue
84 82
              */
Please login to merge, or discard this patch.
Mailler/App/Mailler.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,8 +49,7 @@
 block discarded – undo
49 49
     try {
50 50
         sleep(2);
51 51
         $RabbitReceiver = new Listener(RABBITMQ_QUEUE, RABBITMQ_EXCHANGER);
52
-    }
53
-    catch (\Throwable $exception) {
52
+    } catch (\Throwable $exception) {
54 53
         \writeLog($exception->getMessage());
55 54
 
56 55
         if (!empty($RabbitReceiver)) {
Please login to merge, or discard this patch.