@@ -34,7 +34,7 @@ |
||
34 | 34 | |
35 | 35 | public function getToken() : Mailcode_Parser_Statement_Tokenizer_Token_Variable |
36 | 36 | { |
37 | - if($this->token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Variable) |
|
37 | + if ($this->token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Variable) |
|
38 | 38 | { |
39 | 39 | return $this->token; |
40 | 40 | } |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | { |
34 | 34 | $val = $this->validator->createStringLiteral(); |
35 | 35 | |
36 | - if($val->isValid()) |
|
36 | + if ($val->isValid()) |
|
37 | 37 | { |
38 | 38 | $this->searchTerm = $val->getToken(); |
39 | 39 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | public function getSearchTerm() : string |
50 | 50 | { |
51 | - if($this->searchTerm instanceof Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral) |
|
51 | + if ($this->searchTerm instanceof Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral) |
|
52 | 52 | { |
53 | 53 | return $this->searchTerm->getNormalized(); |
54 | 54 | } |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | { |
34 | 34 | $var = $this->validator->createValue(); |
35 | 35 | |
36 | - if($var->isValid()) |
|
36 | + if ($var->isValid()) |
|
37 | 37 | { |
38 | 38 | $this->valueToken = $var->getToken(); |
39 | 39 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | */ |
54 | 54 | public function getValue() : string |
55 | 55 | { |
56 | - if($this->valueToken instanceof Mailcode_Parser_Statement_Tokenizer_ValueInterface) |
|
56 | + if ($this->valueToken instanceof Mailcode_Parser_Statement_Tokenizer_ValueInterface) |
|
57 | 57 | { |
58 | 58 | return $this->valueToken->getValue(); |
59 | 59 | } |
@@ -39,9 +39,9 @@ discard block |
||
39 | 39 | { |
40 | 40 | $var = $this->validator->createOperand(); |
41 | 41 | |
42 | - if($var->isValid()) |
|
42 | + if ($var->isValid()) |
|
43 | 43 | { |
44 | - if(in_array($var->getSign(), $this->getAllowedOperands())) |
|
44 | + if (in_array($var->getSign(), $this->getAllowedOperands())) |
|
45 | 45 | { |
46 | 46 | $this->operandToken = $var->getToken(); |
47 | 47 | } |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | public function getOperand() : Mailcode_Parser_Statement_Tokenizer_Token_Operand |
68 | 68 | { |
69 | - if($this->operandToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_Operand) |
|
69 | + if ($this->operandToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_Operand) |
|
70 | 70 | { |
71 | 71 | return $this->operandToken; |
72 | 72 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | { |
47 | 47 | $id = $token->getID(); |
48 | 48 | |
49 | - if(!in_array($id, $this->exclude)) |
|
49 | + if (!in_array($id, $this->exclude)) |
|
50 | 50 | { |
51 | 51 | $this->exclude[] = $id; |
52 | 52 | } |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | public function limitByClassName(string $className) : Mailcode_Parser_Statement_Info_Pruner |
68 | 68 | { |
69 | - if(!in_array($className, $this->classNames)) |
|
69 | + if (!in_array($className, $this->classNames)) |
|
70 | 70 | { |
71 | 71 | $this->classNames[] = $className; |
72 | 72 | } |
@@ -85,9 +85,9 @@ discard block |
||
85 | 85 | $tokens = $this->info->getTokens(); |
86 | 86 | $keep = array(); |
87 | 87 | |
88 | - foreach($tokens as $token) |
|
88 | + foreach ($tokens as $token) |
|
89 | 89 | { |
90 | - if(in_array($token->getID(), $this->exclude)) |
|
90 | + if (in_array($token->getID(), $this->exclude)) |
|
91 | 91 | { |
92 | 92 | continue; |
93 | 93 | } |
@@ -48,15 +48,15 @@ |
||
48 | 48 | ->limitToStringLiterals() |
49 | 49 | ->getTokens(); |
50 | 50 | |
51 | - foreach($tokens as $token) |
|
51 | + foreach ($tokens as $token) |
|
52 | 52 | { |
53 | - if($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral) |
|
53 | + if ($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral) |
|
54 | 54 | { |
55 | 55 | $this->searchTerms[] = $token; |
56 | 56 | } |
57 | 57 | } |
58 | 58 | |
59 | - if(empty($this->searchTerms)) |
|
59 | + if (empty($this->searchTerms)) |
|
60 | 60 | { |
61 | 61 | $this->validationResult->makeError( |
62 | 62 | t('No search terms found:').' '. |
@@ -80,7 +80,7 @@ |
||
80 | 80 | |
81 | 81 | protected function validateSyntax_comment() : void |
82 | 82 | { |
83 | - if(empty($this->commentString)) |
|
83 | + if (empty($this->commentString)) |
|
84 | 84 | { |
85 | 85 | $this->validationResult->makeError( |
86 | 86 | t('The comment text ist empty.'), |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | { |
74 | 74 | $val = $this->validator->createVariable()->setIndex(0); |
75 | 75 | |
76 | - if($val->isValid()) |
|
76 | + if ($val->isValid()) |
|
77 | 77 | { |
78 | 78 | $this->variableToken = $val->getToken(); |
79 | 79 | } |
@@ -90,9 +90,9 @@ discard block |
||
90 | 90 | { |
91 | 91 | $tokens = $this->params->getInfo()->createPruner()->limitToOperands()->getTokens(); |
92 | 92 | |
93 | - foreach($tokens as $token) |
|
93 | + foreach ($tokens as $token) |
|
94 | 94 | { |
95 | - if($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Operand) |
|
95 | + if ($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Operand) |
|
96 | 96 | { |
97 | 97 | $this->validateOperand($token); |
98 | 98 | } |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | |
109 | 109 | // ensure that the operand we have in the command is one of the |
110 | 110 | // allowed ones. |
111 | - if(!in_array($sign, $allowed)) |
|
111 | + if (!in_array($sign, $allowed)) |
|
112 | 112 | { |
113 | 113 | $this->validationResult->makeError( |
114 | 114 | t('The %1$s sign is not allowed in this command.', '<code>'.$sign.'</code>'), |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | { |
122 | 122 | $tokens = $this->getAssignmentTokens(); |
123 | 123 | |
124 | - if(empty($tokens)) |
|
124 | + if (empty($tokens)) |
|
125 | 125 | { |
126 | 126 | $this->validationResult->makeError( |
127 | 127 | t('No value assigned to the variable.'), |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | |
133 | 133 | public function getVariable() : Mailcode_Variables_Variable |
134 | 134 | { |
135 | - if($this->variableToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_Variable) |
|
135 | + if ($this->variableToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_Variable) |
|
136 | 136 | { |
137 | 137 | return $this->variableToken->getVariable(); |
138 | 138 | } |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | $eq = array_shift($params); // equals sign |
157 | 157 | |
158 | 158 | // in case the equals sign was omitted. |
159 | - if(!$eq instanceof Mailcode_Parser_Statement_Tokenizer_Token_Operand) |
|
159 | + if (!$eq instanceof Mailcode_Parser_Statement_Tokenizer_Token_Operand) |
|
160 | 160 | { |
161 | 161 | array_unshift($params, $eq); |
162 | 162 | } |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | |
171 | 171 | $items = array(); |
172 | 172 | |
173 | - foreach($tokens as $token) |
|
173 | + foreach ($tokens as $token) |
|
174 | 174 | { |
175 | 175 | $items[] = $token->getNormalized(); |
176 | 176 | } |
@@ -32,7 +32,7 @@ |
||
32 | 32 | |
33 | 33 | public function requiresAdjustment(): bool |
34 | 34 | { |
35 | - if(!parent::requiresAdjustment()) |
|
35 | + if (!parent::requiresAdjustment()) |
|
36 | 36 | { |
37 | 37 | return false; |
38 | 38 | } |