Conditions | 4 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
33 | protected function validateSyntax_check_timezone(): void |
||
34 | { |
||
35 | $tokens = $this->requireParams()->getInfo()->getTokens(); |
||
|
|||
36 | |||
37 | if (count($tokens) > 2) { |
||
38 | $this->timezoneToken = $tokens[2]; |
||
39 | |||
40 | if (!$this->timezoneToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral && |
||
41 | !$this->timezoneToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_Variable) { |
||
42 | $this->validationResult->makeError( |
||
43 | t('Invalid timezone type.' . ' ' . 'Expected String or Variable.'), |
||
44 | TimezoneInterface::VALIDATION_TIMEZONE_CODE_WRONG_TYPE |
||
45 | ); |
||
46 | return; |
||
47 | } |
||
48 | |||
49 | $this->timezoneEnabled = true; |
||
50 | } |
||
63 |