Passed
Push — master ( ad7522...d3eb9e )
by Sebastian
05:45
created
src/Mailcode/Factory/CommandSets/Set/Show.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         
34 34
         $this->instantiator->checkCommand($cmd);
35 35
         
36
-        if($cmd instanceof Mailcode_Commands_Command_ShowVariable)
36
+        if ($cmd instanceof Mailcode_Commands_Command_ShowVariable)
37 37
         {
38 38
             return $cmd;
39 39
         }
@@ -41,12 +41,12 @@  discard block
 block discarded – undo
41 41
         throw $this->instantiator->exceptionUnexpectedType('ShowVariable', $cmd);
42 42
     }
43 43
     
44
-    public function date(string $variableName, string $formatString="") : Mailcode_Commands_Command_ShowDate
44
+    public function date(string $variableName, string $formatString = "") : Mailcode_Commands_Command_ShowDate
45 45
     {
46 46
         $variableName = $this->instantiator->filterVariableName($variableName);
47 47
         
48 48
         $format = '';
49
-        if(!empty($formatString))
49
+        if (!empty($formatString))
50 50
         {
51 51
             $format = sprintf(
52 52
                 ' "%s"',
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         
68 68
         $this->instantiator->checkCommand($cmd);
69 69
         
70
-        if($cmd instanceof Mailcode_Commands_Command_ShowDate)
70
+        if ($cmd instanceof Mailcode_Commands_Command_ShowDate)
71 71
         {
72 72
             return $cmd;
73 73
         }
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         throw $this->instantiator->exceptionUnexpectedType('ShowDate', $cmd);
76 76
     }
77 77
 
78
-    public function number(string $variableName, string $formatString="", bool $absolute=false) : Mailcode_Commands_Command_ShowNumber
78
+    public function number(string $variableName, string $formatString = "", bool $absolute = false) : Mailcode_Commands_Command_ShowNumber
79 79
     {
80 80
         $variableName = $this->instantiator->filterVariableName($variableName);
81 81
         $paramsString = $this->compileNumberParams($formatString, $absolute);
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
         $this->instantiator->checkCommand($cmd);
95 95
 
96
-        if($cmd instanceof Mailcode_Commands_Command_ShowNumber)
96
+        if ($cmd instanceof Mailcode_Commands_Command_ShowNumber)
97 97
         {
98 98
             return $cmd;
99 99
         }
@@ -101,11 +101,11 @@  discard block
 block discarded – undo
101 101
         throw $this->instantiator->exceptionUnexpectedType('ShowNumber', $cmd);
102 102
     }
103 103
 
104
-    private function compileNumberParams(string $formatString="", bool $absolute=false) : string
104
+    private function compileNumberParams(string $formatString = "", bool $absolute = false) : string
105 105
     {
106 106
         $params = array();
107 107
 
108
-        if(!empty($formatString))
108
+        if (!empty($formatString))
109 109
         {
110 110
             $params[] = sprintf(
111 111
                 ' "%s"',
@@ -113,12 +113,12 @@  discard block
 block discarded – undo
113 113
             );
114 114
         }
115 115
 
116
-        if($absolute)
116
+        if ($absolute)
117 117
         {
118 118
             $params[] = ' absolute:';
119 119
         }
120 120
 
121
-        if(!empty($params))
121
+        if (!empty($params))
122 122
         {
123 123
             return ' '.implode(' ', $params);
124 124
         }
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
      * @throws Mailcode_Exception
137 137
      * @throws Mailcode_Factory_Exception
138 138
      */
139
-    public function phone(string $variableName, string $sourceFormat, string $urlEncoding=Mailcode_Factory::URL_ENCODING_NONE) : Mailcode_Commands_Command_ShowPhone
139
+    public function phone(string $variableName, string $sourceFormat, string $urlEncoding = Mailcode_Factory::URL_ENCODING_NONE) : Mailcode_Commands_Command_ShowPhone
140 140
     {
141 141
         $variableName = $this->instantiator->filterVariableName($variableName);
142 142
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
         $this->instantiator->checkCommand($cmd);
160 160
         $this->instantiator->setEncoding($cmd, $urlEncoding);
161 161
 
162
-        if($cmd instanceof Mailcode_Commands_Command_ShowPhone)
162
+        if ($cmd instanceof Mailcode_Commands_Command_ShowPhone)
163 163
         {
164 164
             return $cmd;
165 165
         }
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         
181 181
         $this->instantiator->checkCommand($cmd);
182 182
         
183
-        if($cmd instanceof Mailcode_Commands_Command_ShowSnippet)
183
+        if ($cmd instanceof Mailcode_Commands_Command_ShowSnippet)
184 184
         {
185 185
             return $cmd;
186 186
         }
Please login to merge, or discard this patch.
src/Mailcode/Interfaces/Commands/Validation/NoHTML.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     public const VALIDATION_NAME_NOHTML = 'nohtml';
10 10
 
11
-    public function setHTMLEnabled(bool $enabled=true);
11
+    public function setHTMLEnabled(bool $enabled = true);
12 12
 
13 13
     public function isHTMLEnabled() : bool;
14 14
 
Please login to merge, or discard this patch.
src/Mailcode/Commands/Command/ShowNumber.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
          $tokens = $this->params->getInfo()->getStringLiterals();
69 69
          
70 70
          // no format specified? Use the default one.
71
-         if(empty($tokens))
71
+         if (empty($tokens))
72 72
          {
73 73
              return;
74 74
          }
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
     {
82 82
         $keywords = $this->params->getInfo()->getKeywords();
83 83
 
84
-        foreach($keywords as $keyword)
84
+        foreach ($keywords as $keyword)
85 85
         {
86
-            if($keyword->getKeyword() === Mailcode_Commands_Keywords::TYPE_ABSOLUTE)
86
+            if ($keyword->getKeyword() === Mailcode_Commands_Keywords::TYPE_ABSOLUTE)
87 87
             {
88 88
                 $this->absoluteKeyword = $keyword;
89 89
                 break;
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     {
96 96
         $result = new Mailcode_Number_Info($format);
97 97
 
98
-        if($result->isValid())
98
+        if ($result->isValid())
99 99
         {
100 100
             $this->formatString = $format;
101 101
             return;
@@ -124,13 +124,13 @@  discard block
 block discarded – undo
124 124
 
125 125
     public function setAbsolute(bool $absolute) : Mailcode_Commands_Command_ShowNumber
126 126
     {
127
-        if($absolute === false && isset($this->absoluteKeyword))
127
+        if ($absolute === false && isset($this->absoluteKeyword))
128 128
         {
129 129
             $this->params->getInfo()->removeKeyword($this->absoluteKeyword->getKeyword());
130 130
             $this->absoluteKeyword = null;
131 131
         }
132 132
 
133
-        if($absolute === true && !isset($this->absoluteKeyword))
133
+        if ($absolute === true && !isset($this->absoluteKeyword))
134 134
         {
135 135
              $this->params
136 136
                  ->getInfo()
Please login to merge, or discard this patch.
src/Mailcode/Translator/Syntax/ApacheVelocity.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         
70 70
         // All other special characters have to be escaped
71 71
         // with two backslashes. 
72
-        foreach($this->regexSpecialChars as $char)
72
+        foreach ($this->regexSpecialChars as $char)
73 73
         {
74 74
             $string = str_replace($char, '\\'.$char, $string);
75 75
         }
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
     protected function addURLEncoding(Mailcode_Commands_Command $command, string $statement) : string
85 85
     {
86
-        if($command->isURLEncoded())
86
+        if ($command->isURLEncoded())
87 87
         {
88 88
             return sprintf(
89 89
                 '${esc.url($%s)}',
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             );
92 92
         }
93 93
 
94
-        if($command->isURLDecoded())
94
+        if ($command->isURLDecoded())
95 95
         {
96 96
             return sprintf(
97 97
                 '${esc.unurl($%s)}',
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
             $numberInfo->getThousandsSeparator()
118 118
         );
119 119
 
120
-        if($absolute)
120
+        if ($absolute)
121 121
         {
122 122
             $cmd .= ".replaceAll('-', '')";
123 123
         }
Please login to merge, or discard this patch.