Passed
Pull Request — master (#18)
by
unknown
09:22
created
src/Mailcode/Translator/Syntax/ApacheVelocity.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         // All other special characters have to be escaped
81 81
         // with two backslashes.
82 82
         foreach ($this->regexSpecialChars as $char) {
83
-            $string = str_replace($char, '\\' . $char, $string);
83
+            $string = str_replace($char, '\\'.$char, $string);
84 84
         }
85 85
 
86 86
         // Restore the escaped quotes, which stay escaped
@@ -141,20 +141,20 @@  discard block
 block discarded – undo
141 141
         if ($currencyToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_Variable) {
142 142
             $displayedCurrency = $currencyToken->getNormalized();
143 143
         } else if ($currencyToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral) {
144
-            $displayedCurrency = '"' . $currencyToken->getText() . '"';
144
+            $displayedCurrency = '"'.$currencyToken->getText().'"';
145 145
         } else if ($withCurrencyName) {
146
-            $displayedCurrency = '"' . $localCurrency->getCurrencyName() . '"';
146
+            $displayedCurrency = '"'.$localCurrency->getCurrencyName().'"';
147 147
         } else {
148
-            $displayedCurrency = '"' . $localCurrency->getCurrencySymbol() . '"';
148
+            $displayedCurrency = '"'.$localCurrency->getCurrencySymbol().'"';
149 149
         }
150 150
 
151 151
         $regionToken = $localCurrency->getRegion();
152 152
         if ($regionToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_Variable) {
153 153
             $displayedCountry = $regionToken->getNormalized();
154 154
         } else if ($regionToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral) {
155
-            $displayedCountry = '"' . $regionToken->getText() . '"';
155
+            $displayedCountry = '"'.$regionToken->getText().'"';
156 156
         } else {
157
-            $displayedCountry = '"' . $localCurrency->getCountry() . '"';
157
+            $displayedCountry = '"'.$localCurrency->getCountry().'"';
158 158
         }
159 159
 
160 160
         return sprintf(
Please login to merge, or discard this patch.
src/Mailcode/Factory/CommandSets/Set/Show.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,8 +62,8 @@
 block discarded – undo
62 62
     }
63 63
 
64 64
     public function price(string $variableName, bool $absolute = false, bool $withCurrencyName = false,
65
-                          string $currencyString = null, string $currencyVariable = null,
66
-                          string $regionString = null, string $regionVariable = null): Mailcode_Commands_Command_ShowPrice
65
+                            string $currencyString = null, string $currencyVariable = null,
66
+                            string $regionString = null, string $regionVariable = null): Mailcode_Commands_Command_ShowPrice
67 67
     {
68 68
         return (new Price())->create($variableName, $absolute, $withCurrencyName, $currencyString, $currencyVariable, $regionString, $regionVariable);
69 69
     }
Please login to merge, or discard this patch.
src/Mailcode/Factory/CommandSets/Set/Show/Price.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@
 block discarded – undo
27 27
 class Price extends Mailcode_Factory_CommandSets_Set
28 28
 {
29 29
     public function create(string $variableName, bool $absolute = false, bool $withCurrencyName = true,
30
-                           string $currencyString = null, string $currencyVariable = null,
31
-                           string $regionString = null, string $regionVariable = null): Mailcode_Commands_Command_ShowPrice
30
+                            string $currencyString = null, string $currencyVariable = null,
31
+                            string $regionString = null, string $regionVariable = null): Mailcode_Commands_Command_ShowPrice
32 32
     {
33 33
         $variableName = $this->instantiator->filterVariableName($variableName);
34 34
 
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         $cmd = $this->commands->createCommand(
40 40
             'ShowPrice',
41 41
             '',
42
-            $variableName . $paramsString,
42
+            $variableName.$paramsString,
43 43
             sprintf(
44 44
                 '{showprice: %s%s}',
45 45
                 $variableName,
@@ -63,37 +63,37 @@  discard block
 block discarded – undo
63 63
         $params = array();
64 64
 
65 65
         if ($absolute) {
66
-            $params[] = ' ' . Mailcode_Commands_Keywords::TYPE_ABSOLUTE;
66
+            $params[] = ' '.Mailcode_Commands_Keywords::TYPE_ABSOLUTE;
67 67
         }
68 68
 
69 69
         if ($currencyString) {
70 70
             $params[] = sprintf(
71
-                ' ' . CurrencyInterface::CURRENCY_PARAMETER_NAME . '=%s',
71
+                ' '.CurrencyInterface::CURRENCY_PARAMETER_NAME.'=%s',
72 72
                 $this->quoteString($currencyString)
73 73
             );
74 74
         } else if ($currencyVariable) {
75 75
             $params[] = sprintf(
76
-                ' ' . CurrencyInterface::CURRENCY_PARAMETER_NAME . '=%s',
76
+                ' '.CurrencyInterface::CURRENCY_PARAMETER_NAME.'=%s',
77 77
                 $currencyVariable
78 78
             );
79 79
         } else if ($withCurrencyName) {
80
-            $params[] = ' ' . Mailcode_Commands_Keywords::TYPE_CURRENCY_NAME;
80
+            $params[] = ' '.Mailcode_Commands_Keywords::TYPE_CURRENCY_NAME;
81 81
         }
82 82
 
83 83
         if ($regionString) {
84 84
             $params[] = sprintf(
85
-                ' ' . RegionInterface::REGION_PARAMETER_NAME . '=%s',
85
+                ' '.RegionInterface::REGION_PARAMETER_NAME.'=%s',
86 86
                 $this->quoteString($regionString)
87 87
             );
88 88
         } else if ($regionVariable) {
89 89
             $params[] = sprintf(
90
-                ' ' . RegionInterface::REGION_PARAMETER_NAME . '=%s',
90
+                ' '.RegionInterface::REGION_PARAMETER_NAME.'=%s',
91 91
                 $regionVariable
92 92
             );
93 93
         }
94 94
 
95 95
         if (!empty($params)) {
96
-            return ' ' . implode(' ', $params);
96
+            return ' '.implode(' ', $params);
97 97
         }
98 98
 
99 99
         return '';
Please login to merge, or discard this patch.
src/Mailcode/Traits/Commands/Validation/CurrencyTrait.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
         if (!$token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Variable &&
40 40
             !$token instanceof Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral) {
41 41
             $this->validationResult->makeError(
42
-                t('Invalid currency token:') . ' ' . t('Expected a variable or a string.'),
42
+                t('Invalid currency token:').' '.t('Expected a variable or a string.'),
43 43
                 CurrencyInterface::VALIDATION_CURRENCY_WRONG_TYPE
44 44
             );
45 45
             return;
Please login to merge, or discard this patch.
src/Mailcode/Traits/Commands/Validation/RegionTrait.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
         if (!$token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Variable &&
40 40
             !$token instanceof Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral) {
41 41
             $this->validationResult->makeError(
42
-                t('Invalid region token:') . ' ' . t('Expected a variable or a string.'),
42
+                t('Invalid region token:').' '.t('Expected a variable or a string.'),
43 43
                 RegionInterface::VALIDATION_REGION_WRONG_TYPE
44 44
             );
45 45
             return;
Please login to merge, or discard this patch.