| @@ -129,8 +129,7 @@ | ||
| 129 | 129 | if(isset($params[$name])) | 
| 130 | 130 |          { | 
| 131 | 131 | $params[$name]->setValue($value); | 
| 132 | - } | |
| 133 | - else | |
| 132 | + } else | |
| 134 | 133 |          { | 
| 135 | 134 | $this->addParam($name, $value); | 
| 136 | 135 | } | 
| @@ -42,14 +42,14 @@ discard block | ||
| 42 | 42 | Mailcode_Parser_Statement_Tokenizer_Process_ExtractTokens::class | 
| 43 | 43 | ); | 
| 44 | 44 | |
| 45 | - /** | |
| 46 | - * @var Mailcode_Parser_Statement | |
| 47 | - */ | |
| 45 | + /** | |
| 46 | + * @var Mailcode_Parser_Statement | |
| 47 | + */ | |
| 48 | 48 | protected Mailcode_Parser_Statement $statement; | 
| 49 | 49 | |
| 50 | - /** | |
| 51 | - * @var string | |
| 52 | - */ | |
| 50 | + /** | |
| 51 | + * @var string | |
| 52 | + */ | |
| 53 | 53 | protected string $tokenized = ''; | 
| 54 | 54 | |
| 55 | 55 | /** | 
| @@ -57,9 +57,9 @@ discard block | ||
| 57 | 57 | */ | 
| 58 | 58 | protected array $tokensOrdered = array(); | 
| 59 | 59 | |
| 60 | - /** | |
| 61 | - * @var string[] | |
| 62 | - */ | |
| 60 | + /** | |
| 61 | + * @var string[] | |
| 62 | + */ | |
| 63 | 63 | protected static array $ids = array(); | 
| 64 | 64 | |
| 65 | 65 | /** | 
| @@ -79,12 +79,12 @@ discard block | ||
| 79 | 79 | return $this->statement->getSourceCommand(); | 
| 80 | 80 | } | 
| 81 | 81 | |
| 82 | - /** | |
| 83 | - * Retrieves all tokens detected in the statement string, in | |
| 84 | - * the order they were found. | |
| 85 | - * | |
| 86 | - * @return Mailcode_Parser_Statement_Tokenizer_Token[] | |
| 87 | - */ | |
| 82 | + /** | |
| 83 | + * Retrieves all tokens detected in the statement string, in | |
| 84 | + * the order they were found. | |
| 85 | + * | |
| 86 | + * @return Mailcode_Parser_Statement_Tokenizer_Token[] | |
| 87 | + */ | |
| 88 | 88 | public function getTokens() : array | 
| 89 | 89 |      { | 
| 90 | 90 | return $this->tokensOrdered; | 
| @@ -95,11 +95,11 @@ discard block | ||
| 95 | 95 | return !empty($this->tokensOrdered); | 
| 96 | 96 | } | 
| 97 | 97 | |
| 98 | - /** | |
| 99 | - * Whether there were any unknown tokens in the statement. | |
| 100 | - * | |
| 101 | - * @return bool | |
| 102 | - */ | |
| 98 | + /** | |
| 99 | + * Whether there were any unknown tokens in the statement. | |
| 100 | + * | |
| 101 | + * @return bool | |
| 102 | + */ | |
| 103 | 103 | public function hasUnknown() : bool | 
| 104 | 104 |      { | 
| 105 | 105 | $unknown = $this->getUnknown(); | 
| @@ -107,11 +107,11 @@ discard block | ||
| 107 | 107 | return !empty($unknown); | 
| 108 | 108 | } | 
| 109 | 109 | |
| 110 | - /** | |
| 111 | - * Retrieves all unknown content tokens, if any. | |
| 112 | - * | |
| 113 | - * @return Mailcode_Parser_Statement_Tokenizer_Token_Unknown[] | |
| 114 | - */ | |
| 110 | + /** | |
| 111 | + * Retrieves all unknown content tokens, if any. | |
| 112 | + * | |
| 113 | + * @return Mailcode_Parser_Statement_Tokenizer_Token_Unknown[] | |
| 114 | + */ | |
| 115 | 115 | public function getUnknown() : array | 
| 116 | 116 |      { | 
| 117 | 117 | $result = array(); | 
| @@ -347,13 +347,13 @@ discard block | ||
| 347 | 347 | return $this; | 
| 348 | 348 | } | 
| 349 | 349 | |
| 350 | - /** | |
| 351 | - * Generates a unique alphabet-based ID without numbers | |
| 352 | - * to use as token name, to avoid conflicts with the | |
| 353 | - * numbers detection. | |
| 354 | - * | |
| 355 | - * @return string | |
| 356 | - */ | |
| 350 | + /** | |
| 351 | + * Generates a unique alphabet-based ID without numbers | |
| 352 | + * to use as token name, to avoid conflicts with the | |
| 353 | + * numbers detection. | |
| 354 | + * | |
| 355 | + * @return string | |
| 356 | + */ | |
| 357 | 357 | protected function generateID() : string | 
| 358 | 358 |      { | 
| 359 | 359 | static $alphas; | 
| @@ -30,10 +30,10 @@ discard block | ||
| 30 | 30 | public const VALIDATION_INVALID_DECIMAL_SEPARATOR = 72209; | 
| 31 | 31 | public const VALIDATION_SEPARATORS_SAME_CHARACTER = 72210; | 
| 32 | 32 | |
| 33 | - /** | |
| 34 | - * The default number format string. | |
| 35 | - * @var string | |
| 36 | - */ | |
| 33 | + /** | |
| 34 | + * The default number format string. | |
| 35 | + * @var string | |
| 36 | + */ | |
| 37 | 37 | private string $formatString = Mailcode_Number_Info::DEFAULT_FORMAT; | 
| 38 | 38 | |
| 39 | 39 | /** | 
| @@ -62,18 +62,18 @@ discard block | ||
| 62 | 62 | |
| 63 | 63 | protected function validateSyntax_check_format() : void | 
| 64 | 64 |      { | 
| 65 | - $tokens = $this->requireParams() | |
| 66 | - ->getInfo() | |
| 67 | - ->getStringLiterals(); | |
| 65 | + $tokens = $this->requireParams() | |
| 66 | + ->getInfo() | |
| 67 | + ->getStringLiterals(); | |
| 68 | 68 | |
| 69 | - // no format specified? Use the default one. | |
| 70 | - if(empty($tokens)) | |
| 71 | -         { | |
| 72 | - return; | |
| 73 | - } | |
| 74 | - | |
| 75 | - $token = array_pop($tokens); | |
| 76 | - $this->parseFormatString($token->getText()); | |
| 69 | + // no format specified? Use the default one. | |
| 70 | + if(empty($tokens)) | |
| 71 | +            { | |
| 72 | + return; | |
| 73 | + } | |
| 74 | + | |
| 75 | + $token = array_pop($tokens); | |
| 76 | + $this->parseFormatString($token->getText()); | |
| 77 | 77 | } | 
| 78 | 78 | |
| 79 | 79 | protected function validateSyntax_absolute() : void | 
| @@ -108,11 +108,11 @@ discard block | ||
| 108 | 108 | ); | 
| 109 | 109 | } | 
| 110 | 110 | |
| 111 | - /** | |
| 112 | - * Retrieves the format string used to format the number. | |
| 113 | - * | |
| 114 | - * @return string | |
| 115 | - */ | |
| 111 | + /** | |
| 112 | + * Retrieves the format string used to format the number. | |
| 113 | + * | |
| 114 | + * @return string | |
| 115 | + */ | |
| 116 | 116 | public function getFormatString() : string | 
| 117 | 117 |      { | 
| 118 | 118 | return $this->formatString; | 
| @@ -133,11 +133,11 @@ discard block | ||
| 133 | 133 | |
| 134 | 134 | if($absolute === true && !isset($this->absoluteKeyword)) | 
| 135 | 135 |          { | 
| 136 | - $this->requireParams() | |
| 137 | - ->getInfo() | |
| 138 | - ->addKeyword(Mailcode_Commands_Keywords::TYPE_ABSOLUTE); | |
| 136 | + $this->requireParams() | |
| 137 | + ->getInfo() | |
| 138 | + ->addKeyword(Mailcode_Commands_Keywords::TYPE_ABSOLUTE); | |
| 139 | 139 | |
| 140 | - $this->validateSyntax_absolute(); | |
| 140 | + $this->validateSyntax_absolute(); | |
| 141 | 141 | } | 
| 142 | 142 | |
| 143 | 143 | return $this; | 
| @@ -20,15 +20,15 @@ discard block | ||
| 20 | 20 | */ | 
| 21 | 21 | class Mailcode_Commands_Command_ShowDate extends Mailcode_Commands_ShowBase | 
| 22 | 22 |  { | 
| 23 | - /** | |
| 24 | - * The date format string. | |
| 25 | - * @var string | |
| 26 | - */ | |
| 23 | + /** | |
| 24 | + * The date format string. | |
| 25 | + * @var string | |
| 26 | + */ | |
| 27 | 27 | private string $formatString; | 
| 28 | 28 | |
| 29 | - /** | |
| 30 | - * @var Mailcode_Date_FormatInfo | |
| 31 | - */ | |
| 29 | + /** | |
| 30 | + * @var Mailcode_Date_FormatInfo | |
| 31 | + */ | |
| 32 | 32 | private Mailcode_Date_FormatInfo $formatInfo; | 
| 33 | 33 | |
| 34 | 34 | public function getName() : string | 
| @@ -89,11 +89,11 @@ discard block | ||
| 89 | 89 | ); | 
| 90 | 90 | } | 
| 91 | 91 | |
| 92 | - /** | |
| 93 | - * Retrieves the format string used to format the date. | |
| 94 | - * | |
| 95 | - * @return string A PHP compatible date format string. | |
| 96 | - */ | |
| 92 | + /** | |
| 93 | + * Retrieves the format string used to format the date. | |
| 94 | + * | |
| 95 | + * @return string A PHP compatible date format string. | |
| 96 | + */ | |
| 97 | 97 | public function getFormatString() : string | 
| 98 | 98 |      { | 
| 99 | 99 | return $this->formatString; |