Passed
Push — master ( 9bab94...77b992 )
by Sebastian
13:50
created
src/Mailcode/Commands/Command.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     */
58 58
     protected $validationResult = null;
59 59
     
60
-    public function __construct(string $type='', string $paramsString='', string $matchedText='')
60
+    public function __construct(string $type = '', string $paramsString = '', string $matchedText = '')
61 61
     {
62 62
         $this->type = $type;
63 63
         $this->paramsString = $paramsString;
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     {
96 96
         $this->requireNonDummy();
97 97
         
98
-        if($this->hash === '') {
98
+        if ($this->hash === '') {
99 99
             $this->hash = md5($this->matchedText);
100 100
         }
101 101
         
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     
105 105
     protected function requireNonDummy() : void
106 106
     {
107
-        if(!$this->isDummy())
107
+        if (!$this->isDummy())
108 108
         {
109 109
             return;
110 110
         }
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
     {
126 126
         $this->requireNonDummy();
127 127
         
128
-        if(isset($this->validationResult)) 
128
+        if (isset($this->validationResult)) 
129 129
         {
130 130
             return $this->validationResult;
131 131
         }
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     
142 142
     public function getValidationResult() :  \AppUtils\OperationResult
143 143
     {
144
-        if(isset($this->validationResult)) 
144
+        if (isset($this->validationResult)) 
145 145
         {
146 146
             return $this->validationResult;
147 147
         }
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     
156 156
     protected function validateSyntax()
157 157
     {
158
-        if($this->requiresParameters() && empty($this->paramsString))
158
+        if ($this->requiresParameters() && empty($this->paramsString))
159 159
         {
160 160
             $this->validationResult->makeError(
161 161
                 t('Parameters have to be specified.'),
@@ -164,11 +164,11 @@  discard block
 block discarded – undo
164 164
             return;
165 165
         }
166 166
         
167
-        if($this->supportsType() && !empty($this->type))
167
+        if ($this->supportsType() && !empty($this->type))
168 168
         {
169 169
             $types = $this->getSupportedTypes();
170 170
 
171
-            if(!in_array($this->type, $types))
171
+            if (!in_array($this->type, $types))
172 172
             {
173 173
                 $this->validationResult->makeError(
174 174
                     t('The command addon %1$s is not supported.', $this->type).' '.
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
             }
181 181
         }
182 182
         
183
-        if(!$this->supportsType() && !empty($this->type))
183
+        if (!$this->supportsType() && !empty($this->type))
184 184
         {
185 185
             $this->validationResult->makeError(
186 186
                 t('Command addons are not supported (the %1$s part).', $this->type),
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
     
199 199
     public function getType() : string
200 200
     {
201
-        if($this->supportsType())
201
+        if ($this->supportsType())
202 202
         {
203 203
             return $this->type;
204 204
         }
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
     
225 225
     public function getParamsString() : string
226 226
     {
227
-        if($this->requiresParameters())
227
+        if ($this->requiresParameters())
228 228
         {
229 229
             return $this->paramsString;
230 230
         }
Please login to merge, or discard this patch.
src/Mailcode/Commands/Highlighter.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,19 +20,19 @@
 block discarded – undo
20 20
  */
21 21
 class Mailcode_Commands_Highlighter
22 22
 {
23
-   /**
24
-    * @var Mailcode_Commands_Command
25
-    */
23
+    /**
24
+     * @var Mailcode_Commands_Command
25
+     */
26 26
     protected $command;
27 27
     
28
-   /**
29
-    * @var string[]
30
-    */
28
+    /**
29
+     * @var string[]
30
+     */
31 31
     protected $parts = array();
32 32
     
33 33
     public function __construct(Mailcode_Commands_Command $command)
34 34
     {
35
-       $this->command = $command;
35
+        $this->command = $command;
36 36
     }
37 37
     
38 38
     public function highlight() : string
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     {
52 52
         $this->parts[] = $this->renderTag(array('command-name'), $this->command->getName());
53 53
         
54
-        if($this->command->hasType())
54
+        if ($this->command->hasType())
55 55
         {
56 56
             $this->parts[] = ' '.$this->renderTag(array('command-type'), $this->command->getType());
57 57
         }
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     
63 63
     protected function appendParams()
64 64
     {
65
-        if($this->command->hasParameters())
65
+        if ($this->command->hasParameters())
66 66
         {
67 67
             $this->parts[] = ' '.$this->renderTag(array('params'), $this->command->getParamsString());
68 68
         }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     {
73 73
         $parts = array();
74 74
         
75
-        foreach($classes as $class)
75
+        foreach ($classes as $class)
76 76
         {
77 77
             $parts[] = 'mailcode-'.$class;
78 78
         }
Please login to merge, or discard this patch.