@@ -28,13 +28,13 @@ |
||
28 | 28 | $commandID = ClassHelper::getClassTypeName(Mailcode_Commands_Command_SetVariable::class); |
29 | 29 | |
30 | 30 | if ($asCount) { |
31 | - $params = $variableName . ' count: ' . $value; |
|
31 | + $params = $variableName.' count: '.$value; |
|
32 | 32 | } else { |
33 | 33 | if ($quoteValue) { |
34 | 34 | $value = $this->instantiator->quoteString($value); |
35 | 35 | } |
36 | 36 | |
37 | - $params = $variableName . ' = ' . $value; |
|
37 | + $params = $variableName.' = '.$value; |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | $cmd = $this->commands->createCommand( |
@@ -47,7 +47,7 @@ |
||
47 | 47 | if ($this->countEnabled) { |
48 | 48 | if (!$this->countToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_Variable) { |
49 | 49 | $this->validationResult->makeError( |
50 | - t('Invalid count subject:') . ' ' . t('Expected a variable.'), |
|
50 | + t('Invalid count subject:').' '.t('Expected a variable.'), |
|
51 | 51 | CountInterface::VALIDATION_COUNT_CODE_WRONG_TYPE |
52 | 52 | ); |
53 | 53 | return; |
@@ -43,13 +43,13 @@ discard block |
||
43 | 43 | |
44 | 44 | $val = $this->validator->createKeyword(Mailcode_Commands_Keywords::TYPE_BREAK_AT); |
45 | 45 | |
46 | - $this->breakAtEnabled = $val->isValid() && $this->breakAtToken != null;; |
|
46 | + $this->breakAtEnabled = $val->isValid() && $this->breakAtToken != null; ; |
|
47 | 47 | |
48 | 48 | if ($this->breakAtEnabled) { |
49 | 49 | if (!$this->breakAtToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_Number && |
50 | 50 | !$this->breakAtToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_Variable) { |
51 | 51 | $this->validationResult->makeError( |
52 | - t('Invalid break-at value:') . ' ' . t('Expected a number or variable.'), |
|
52 | + t('Invalid break-at value:').' '.t('Expected a number or variable.'), |
|
53 | 53 | BreakAtInterface::VALIDATION_BREAK_AT_CODE_WRONG_TYPE |
54 | 54 | ); |
55 | 55 | return; |
@@ -73,19 +73,19 @@ discard block |
||
73 | 73 | public function getBreakAt() |
74 | 74 | { |
75 | 75 | $token = $this->getBreakAtToken(); |
76 | - if($token === null) { |
|
76 | + if ($token === null) { |
|
77 | 77 | return null; |
78 | 78 | } |
79 | 79 | |
80 | - if($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Variable) { |
|
80 | + if ($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Variable) { |
|
81 | 81 | return $token->getVariable(); |
82 | 82 | } |
83 | 83 | |
84 | - if($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Number) { |
|
84 | + if ($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Number) { |
|
85 | 85 | return (int)$token->getValue(); |
86 | 86 | } |
87 | 87 | |
88 | - if($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral) { |
|
88 | + if ($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral) { |
|
89 | 89 | return (int)$token->getText(); |
90 | 90 | } |
91 | 91 |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | if (!$this->timezoneToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral && |
50 | 50 | !$this->timezoneToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_Variable) { |
51 | 51 | $this->validationResult->makeError( |
52 | - t('Invalid timezone:') . ' ' . t('Expected a string or variable.'), |
|
52 | + t('Invalid timezone:').' '.t('Expected a string or variable.'), |
|
53 | 53 | TimezoneInterface::VALIDATION_TIMEZONE_CODE_WRONG_TYPE |
54 | 54 | ); |
55 | 55 | } |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | */ |
65 | 65 | public function getTimezoneToken(): Mailcode_Parser_Statement_Tokenizer_Token |
66 | 66 | { |
67 | - if(!isset($this->timezoneToken)) { |
|
67 | + if (!isset($this->timezoneToken)) { |
|
68 | 68 | $this->timezoneToken = $this->createTimeZoneToken(); |
69 | 69 | } |
70 | 70 | |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | { |
81 | 81 | $default = Mailcode_Commands_Command_ShowDate::getDefaultTimezone(); |
82 | 82 | |
83 | - if($default instanceof Mailcode_Variables_Variable) { |
|
83 | + if ($default instanceof Mailcode_Variables_Variable) { |
|
84 | 84 | return new Mailcode_Parser_Statement_Tokenizer_Token_Variable( |
85 | 85 | 'showdate-timezone-token', |
86 | 86 | $default->getFullName(), |
@@ -148,8 +148,8 @@ discard block |
||
148 | 148 | |
149 | 149 | if (!in_array($char, $this->allowedChars)) { |
150 | 150 | $result->makeError( |
151 | - t('Invalid character in date format:') . ' ' . |
|
152 | - t('%1$s at position %2$s.', '<code>' . $char . '</code>', $i + 1), |
|
151 | + t('Invalid character in date format:').' '. |
|
152 | + t('%1$s at position %2$s.', '<code>'.$char.'</code>', $i + 1), |
|
153 | 153 | self::VALIDATION_INVALID_FORMAT_CHARACTER |
154 | 154 | ); |
155 | 155 | |
@@ -194,12 +194,12 @@ discard block |
||
194 | 194 | $groups = array_keys($grouped); |
195 | 195 | |
196 | 196 | foreach ($groups as $group) { |
197 | - usort($grouped[$group], function (Mailcode_Date_FormatInfo_Character $a, Mailcode_Date_FormatInfo_Character $b) { |
|
197 | + usort($grouped[$group], function(Mailcode_Date_FormatInfo_Character $a, Mailcode_Date_FormatInfo_Character $b) { |
|
198 | 198 | return strnatcasecmp($a->getChar(), $b->getChar()); |
199 | 199 | }); |
200 | 200 | } |
201 | 201 | |
202 | - uksort($grouped, function (string $a, string $b) { |
|
202 | + uksort($grouped, function(string $a, string $b) { |
|
203 | 203 | return strnatcasecmp($a, $b); |
204 | 204 | }); |
205 | 205 |