Test Failed
Push — master ( d9cf0c...62420e )
by Sebastian
05:48 queued 02:23
created
tools/syntax-highlighter.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 use Mailcode\Mailcode_Exception;
17 17
 use Mailcode\Mailcode_Translator_Exception;
18 18
 use function \AppLocalize\pt;
19
-use function \AppLocalize\pts;use function AppLocalize\t;
19
+use function \AppLocalize\pts; use function AppLocalize\t;
20 20
 
21 21
 require_once 'prepend.php';
22 22
 
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 $translated = '';
28 28
 $error = null;
29 29
 
30
-if($request->getBool('highlight'))
30
+if ($request->getBool('highlight'))
31 31
 {
32 32
     $commandsText = $request->getParam('mailcode');
33 33
 
@@ -42,13 +42,13 @@  discard block
 block discarded – undo
42 42
         $error = $e->getMessage();
43 43
 
44 44
         $collection = $e->getCollection();
45
-        if($collection)
45
+        if ($collection)
46 46
         {
47 47
             $first = $collection->getFirstError();
48 48
             $error = $first->getMessage();
49 49
             $matched = $first->getMatchedText();
50
-            if(!empty($matched)) {
51
-                $error .= '<br>'. t('In command:').' <code>'.$matched.'</code>';
50
+            if (!empty($matched)) {
51
+                $error .= '<br>'.t('In command:').' <code>'.$matched.'</code>';
52 52
             }
53 53
         }
54 54
     }
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         <p></p><br>
93 93
         <h2><?php pt('Highlighted commands') ?></h2>
94 94
         <?php
95
-            if(empty($commandsText))
95
+            if (empty($commandsText))
96 96
             {
97 97
                 ?>
98 98
                     <div class="alert alert-info">
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
                     </div>
101 101
                 <?php
102 102
             }
103
-            else if($error)
103
+            else if ($error)
104 104
             {
105 105
                 ?>
106 106
                     <div class="alert alert-danger">
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,8 +36,7 @@  discard block
 block discarded – undo
36 36
         $safeguard = $mailcode->createSafeguard($commandsText);
37 37
         $safe = htmlspecialchars($safeguard->makeSafe(), ENT_QUOTES, 'UTF-8');
38 38
         $highlighted = $safeguard->makeHighlighted($safe);
39
-    }
40
-    catch (Mailcode_Exception $e)
39
+    } catch (Mailcode_Exception $e)
41 40
     {
42 41
         $error = $e->getMessage();
43 42
 
@@ -99,8 +98,7 @@  discard block
 block discarded – undo
99 98
                         <?php pt('No commands specified.') ?>
100 99
                     </div>
101 100
                 <?php
102
-            }
103
-            else if($error)
101
+            } else if($error)
104 102
             {
105 103
                 ?>
106 104
                     <div class="alert alert-danger">
@@ -108,8 +106,7 @@  discard block
 block discarded – undo
108 106
                         <?php echo $error ?>
109 107
                     </div>
110 108
                 <?php
111
-            }
112
-            else
109
+            } else
113 110
             {
114 111
                 ?>
115 112
                     <pre style="border: solid 1px #ccc;padding:12px;border-radius: 5px"><?php
Please login to merge, or discard this patch.