@@ -59,12 +59,12 @@ |
||
59 | 59 | * @throws Mailcode_Exception |
60 | 60 | * @throws Mailcode_Factory_Exception |
61 | 61 | */ |
62 | - public function for(string $sourceVariable, string $loopVariable, $breakAtValue = ''): Mailcode_Commands_Command_For |
|
62 | + public function for (string $sourceVariable, string $loopVariable, $breakAtValue = ''): Mailcode_Commands_Command_For |
|
63 | 63 | { |
64 | 64 | $sourceVariable = dollarize($sourceVariable); |
65 | 65 | $loopVariable = dollarize($loopVariable); |
66 | 66 | |
67 | - if($breakAtValue instanceof Mailcode_Variables_Variable) { |
|
67 | + if ($breakAtValue instanceof Mailcode_Variables_Variable) { |
|
68 | 68 | $breakAtValue = $breakAtValue->getFullName(); |
69 | 69 | } |
70 | 70 |
@@ -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(), |