Test Failed
Push — master ( 9ff364...742ef2 )
by Sebastian
03:58
created
localization/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     $autoload = realpath($root.'/../vendor/autoload.php');
13 13
     
14 14
     // we need the autoloader to be present
15
-    if($autoload === false) 
15
+    if ($autoload === false) 
16 16
     {
17 17
         die('<b>ERROR:</b> Autoloader not present. Run composer update first.');
18 18
     }
Please login to merge, or discard this patch.
src/Mailcode/Variables/Collection/Regular.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     
33 33
     public function add(Mailcode_Variables_Variable $variable) : Mailcode_Variables_Collection
34 34
     {
35
-        if(!$variable->isValid())
35
+        if (!$variable->isValid())
36 36
         {
37 37
             return $this->addInvalid($variable);
38 38
         }
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         parent::mergeWith($collection);
77 77
         
78 78
         // also inherit any invalid variables
79
-        if($collection instanceof Mailcode_Variables_Collection_Regular)
79
+        if ($collection instanceof Mailcode_Variables_Collection_Regular)
80 80
         {
81 81
             $invalid = $collection->getInvalid();
82 82
             
Please login to merge, or discard this patch.
src/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
  */
24 24
 function init() : void
25 25
 {
26
-    if(!class_exists('\AppLocalize\Localization')) {
26
+    if (!class_exists('\AppLocalize\Localization')) {
27 27
         return;
28 28
     }
29 29
     
Please login to merge, or discard this patch.
src/Mailcode/Factory/Exception.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     * @param \Exception|NULL $previous
33 33
     * @param Mailcode_Commands_Command|NULL $command
34 34
     */
35
-    public function __construct(string $message, $details=null, $code=null, $previous=null, Mailcode_Commands_Command $command=null)
35
+    public function __construct(string $message, $details = null, $code = null, $previous = null, Mailcode_Commands_Command $command = null)
36 36
     {
37 37
         parent::__construct($message, $details, $code, $previous);
38 38
         
Please login to merge, or discard this patch.
src/Mailcode/Date/FormatInfo/Character.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
     */
88 88
     public function getTypeLabel() : string
89 89
     {
90
-        switch($this->type)
90
+        switch ($this->type)
91 91
         {
92 92
             case Mailcode_Date_FormatInfo::CHARTYPE_DATE:
93 93
                 return t('Date');
Please login to merge, or discard this patch.
src/Mailcode/Date/FormatInfo.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     
59 59
     public static function getInstance() : Mailcode_Date_FormatInfo
60 60
     {
61
-        if(!isset(self::$instance))
61
+        if (!isset(self::$instance))
62 62
         {
63 63
             self::$instance = new Mailcode_Date_FormatInfo();
64 64
         }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
             array(self::CHARTYPE_PUNCTUATION, ' ', t('Space'))
91 91
         );
92 92
         
93
-        foreach($chars as $def)
93
+        foreach ($chars as $def)
94 94
         {
95 95
             $char = new Mailcode_Date_FormatInfo_Character(
96 96
                 $def[0],
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         
130 130
         $trimmed = trim($formatString);
131 131
         
132
-        if(empty($trimmed))
132
+        if (empty($trimmed))
133 133
         {
134 134
             $result->makeError(
135 135
                 t('Empty date format.'),
@@ -142,15 +142,15 @@  discard block
 block discarded – undo
142 142
         $chars = ConvertHelper::string2array($formatString);
143 143
         $total = count($chars);
144 144
         
145
-        for($i=0; $i < $total; $i++)
145
+        for ($i = 0; $i < $total; $i++)
146 146
         {
147 147
             $char = $chars[$i];
148 148
             
149
-            if(!in_array($char, $this->allowedChars))
149
+            if (!in_array($char, $this->allowedChars))
150 150
             {
151 151
                 $result->makeError(
152 152
                     t('Invalid character in date format:').' '.
153
-                    t('%1$s at position %2$s.', '<code>'.$char.'</code>', $i+1),
153
+                    t('%1$s at position %2$s.', '<code>'.$char.'</code>', $i + 1),
154 154
                     self::VALIDATION_INVALID_FORMAT_CHARACTER
155 155
                 );
156 156
                 
@@ -182,11 +182,11 @@  discard block
 block discarded – undo
182 182
     {
183 183
         $grouped = array();
184 184
         
185
-        foreach($this->formatChars as $char)
185
+        foreach ($this->formatChars as $char)
186 186
         {
187 187
             $type = $char->getTypeLabel();
188 188
             
189
-            if(!isset($grouped[$type]))
189
+            if (!isset($grouped[$type]))
190 190
             {
191 191
                 $grouped[$type] = array();
192 192
             }
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 
197 197
         $groups = array_keys($grouped);
198 198
         
199
-        foreach($groups as $group)
199
+        foreach ($groups as $group)
200 200
         {
201 201
             usort($grouped[$group], function(Mailcode_Date_FormatInfo_Character $a, Mailcode_Date_FormatInfo_Character $b)
202 202
             {
Please login to merge, or discard this patch.
src/Mailcode/Factory/CommandSets/Set.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
         
42 42
         $this->instantiator->checkCommand($cmd);
43 43
         
44
-        if($cmd instanceof Mailcode_Commands_Command_End)
44
+        if ($cmd instanceof Mailcode_Commands_Command_End)
45 45
         {
46 46
             return $cmd;
47 47
         }
Please login to merge, or discard this patch.
src/Mailcode/Factory/CommandSets/IfBase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
         
32 32
         $this->instantiator->checkCommand($cmd);
33 33
         
34
-        if($cmd instanceof Mailcode_Commands_Command_Else)
34
+        if ($cmd instanceof Mailcode_Commands_Command_Else)
35 35
         {
36 36
             return $cmd;
37 37
         }
Please login to merge, or discard this patch.
src/Mailcode/Styler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
         $folder = sprintf(__DIR__.'/../../css/%s', $this->fileName);
40 40
         $path = realpath($folder);
41 41
         
42
-        if($path === false)
42
+        if ($path === false)
43 43
         {
44 44
             throw new Mailcode_Exception(
45 45
                 'Could not find the highlight CSS file',
Please login to merge, or discard this patch.