@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | ->getInfo() |
48 | 48 | ->getTokenByParamName(BreakAtInterface::PARAMETER_NAME); |
49 | 49 | |
50 | - if($this->breakAtToken === null) { |
|
50 | + if ($this->breakAtToken === null) { |
|
51 | 51 | $this->breakAtEnabled = false; |
52 | 52 | return; |
53 | 53 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | if (!$this->breakAtToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_Number && |
56 | 56 | !$this->breakAtToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_Variable) { |
57 | 57 | $this->validationResult->makeError( |
58 | - t('Invalid break-at value:') . ' ' . t('Expected a number or variable.'), |
|
58 | + t('Invalid break-at value:').' '.t('Expected a number or variable.'), |
|
59 | 59 | BreakAtInterface::VALIDATION_BREAK_AT_CODE_WRONG_TYPE |
60 | 60 | ); |
61 | 61 | return; |
@@ -80,19 +80,19 @@ discard block |
||
80 | 80 | public function getBreakAt() |
81 | 81 | { |
82 | 82 | $token = $this->getBreakAtToken(); |
83 | - if($token === null) { |
|
83 | + if ($token === null) { |
|
84 | 84 | return null; |
85 | 85 | } |
86 | 86 | |
87 | - if($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Variable) { |
|
87 | + if ($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Variable) { |
|
88 | 88 | return $token->getVariable(); |
89 | 89 | } |
90 | 90 | |
91 | - if($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Number) { |
|
91 | + if ($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Number) { |
|
92 | 92 | return (int)$token->getValue(); |
93 | 93 | } |
94 | 94 | |
95 | - if($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral) { |
|
95 | + if ($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral) { |
|
96 | 96 | return (int)$token->getText(); |
97 | 97 | } |
98 | 98 | |
@@ -109,29 +109,29 @@ discard block |
||
109 | 109 | { |
110 | 110 | $info = $this->requireParams()->getInfo(); |
111 | 111 | |
112 | - if(isset($this->breakAtToken)) { |
|
112 | + if (isset($this->breakAtToken)) { |
|
113 | 113 | $info->removeToken($this->breakAtToken); |
114 | 114 | } |
115 | 115 | |
116 | 116 | $this->breakAtEnabled = false; |
117 | 117 | $this->breakAtToken = null; |
118 | 118 | |
119 | - if($breakAt === null) { |
|
119 | + if ($breakAt === null) { |
|
120 | 120 | return $this; |
121 | 121 | } |
122 | 122 | |
123 | 123 | $token = null; |
124 | 124 | |
125 | - if(is_numeric($breakAt)) |
|
125 | + if (is_numeric($breakAt)) |
|
126 | 126 | { |
127 | 127 | $token = $info->addNumber((string)(int)$breakAt); |
128 | 128 | } |
129 | - else if($breakAt instanceof Mailcode_Variables_Variable) |
|
129 | + else if ($breakAt instanceof Mailcode_Variables_Variable) |
|
130 | 130 | { |
131 | 131 | $token = $info->addVariable($breakAt); |
132 | 132 | } |
133 | 133 | |
134 | - if($token !== null) |
|
134 | + if ($token !== null) |
|
135 | 135 | { |
136 | 136 | $info->setParamName($token, BreakAtInterface::PARAMETER_NAME); |
137 | 137 |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | if (!$this->timezoneToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral && |
48 | 48 | !$this->timezoneToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_Variable) { |
49 | 49 | $this->validationResult->makeError( |
50 | - t('Invalid timezone:') . ' ' . t('Expected a string or variable.'), |
|
50 | + t('Invalid timezone:').' '.t('Expected a string or variable.'), |
|
51 | 51 | TimezoneInterface::VALIDATION_TIMEZONE_CODE_WRONG_TYPE |
52 | 52 | ); |
53 | 53 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | */ |
63 | 63 | public function getTimezoneToken(): Mailcode_Parser_Statement_Tokenizer_Token |
64 | 64 | { |
65 | - if(!isset($this->timezoneToken)) { |
|
65 | + if (!isset($this->timezoneToken)) { |
|
66 | 66 | $this->timezoneToken = $this->createTimeZoneToken(); |
67 | 67 | } |
68 | 68 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $default = Mailcode_Commands_Command_ShowDate::getDefaultTimezone(); |
80 | 80 | $info = $this->requireParams()->getInfo(); |
81 | 81 | |
82 | - if($default instanceof Mailcode_Variables_Variable) { |
|
82 | + if ($default instanceof Mailcode_Variables_Variable) { |
|
83 | 83 | $token = $info->addVariable($default); |
84 | 84 | } else { |
85 | 85 | $token = $info->addStringLiteral($default); |
@@ -100,17 +100,17 @@ discard block |
||
100 | 100 | $token = null; |
101 | 101 | |
102 | 102 | $existing = $info->getTokenByParamName(TimezoneInterface::PARAMETER_NAME); |
103 | - if($existing) { |
|
103 | + if ($existing) { |
|
104 | 104 | $info->removeToken($existing); |
105 | 105 | } |
106 | 106 | |
107 | - if($timezone instanceof Mailcode_Variables_Variable) { |
|
107 | + if ($timezone instanceof Mailcode_Variables_Variable) { |
|
108 | 108 | $token = $info->addVariable($timezone); |
109 | - } else if(is_string($timezone)) { |
|
109 | + } else if (is_string($timezone)) { |
|
110 | 110 | $token = $info->addStringLiteral($timezone); |
111 | 111 | } |
112 | 112 | |
113 | - if($token !== null) { |
|
113 | + if ($token !== null) { |
|
114 | 114 | $info->setParamName($token, TimezoneInterface::PARAMETER_NAME); |
115 | 115 | } |
116 | 116 |