@@ -72,12 +72,12 @@ discard block |
||
72 | 72 | protected function isMatch(Mailcode_Parser_Statement_Tokenizer_Token $token, int $index) : bool |
73 | 73 | { |
74 | 74 | // filter out tokens of other types |
75 | - if(!is_a($token, $this->getTokenClass())) |
|
75 | + if (!is_a($token, $this->getTokenClass())) |
|
76 | 76 | { |
77 | 77 | return false; |
78 | 78 | } |
79 | 79 | |
80 | - if($this->searchIndex >= 0 && $index !== $this->searchIndex) |
|
80 | + if ($this->searchIndex >= 0 && $index !== $this->searchIndex) |
|
81 | 81 | { |
82 | 82 | return false; |
83 | 83 | } |
@@ -96,9 +96,9 @@ discard block |
||
96 | 96 | { |
97 | 97 | $tokens = $this->params->getTokens(); |
98 | 98 | |
99 | - foreach($tokens as $index => $token) |
|
99 | + foreach ($tokens as $index => $token) |
|
100 | 100 | { |
101 | - if($this->isMatch($token, $index)) |
|
101 | + if ($this->isMatch($token, $index)) |
|
102 | 102 | { |
103 | 103 | return $token; |
104 | 104 | } |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | { |
112 | 112 | $token = $this->findToken(); |
113 | 113 | |
114 | - if($token instanceof Mailcode_Parser_Statement_Tokenizer_Token && is_a($token, $this->getTokenClass())) |
|
114 | + if ($token instanceof Mailcode_Parser_Statement_Tokenizer_Token && is_a($token, $this->getTokenClass())) |
|
115 | 115 | { |
116 | 116 | $this->token = $token; |
117 | 117 | return true; |
@@ -58,7 +58,7 @@ |
||
58 | 58 | */ |
59 | 59 | public function validate() : Mailcode_Parser_Statement_Validator_Type |
60 | 60 | { |
61 | - if(!$this->validated) |
|
61 | + if (!$this->validated) |
|
62 | 62 | { |
63 | 63 | $this->valid = $this->_validate(); |
64 | 64 | $this->validated = true; |
@@ -50,7 +50,7 @@ |
||
50 | 50 | |
51 | 51 | public function getToken() : Mailcode_Parser_Statement_Tokenizer_Token_Keyword |
52 | 52 | { |
53 | - if($this->token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Keyword) |
|
53 | + if ($this->token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Keyword) |
|
54 | 54 | { |
55 | 55 | return $this->token; |
56 | 56 | } |
@@ -34,7 +34,7 @@ |
||
34 | 34 | |
35 | 35 | public function getToken() : Mailcode_Parser_Statement_Tokenizer_ValueInterface |
36 | 36 | { |
37 | - if($this->token instanceof Mailcode_Parser_Statement_Tokenizer_ValueInterface) |
|
37 | + if ($this->token instanceof Mailcode_Parser_Statement_Tokenizer_ValueInterface) |
|
38 | 38 | { |
39 | 39 | return $this->token; |
40 | 40 | } |
@@ -34,7 +34,7 @@ |
||
34 | 34 | |
35 | 35 | public function getToken() : Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral |
36 | 36 | { |
37 | - if($this->token instanceof Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral) |
|
37 | + if ($this->token instanceof Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral) |
|
38 | 38 | { |
39 | 39 | return $this->token; |
40 | 40 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | protected function _isMatch(Mailcode_Parser_Statement_Tokenizer_Token $token) : bool |
43 | 43 | { |
44 | - if(!empty($this->sign) && $token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Operand) |
|
44 | + if (!empty($this->sign) && $token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Operand) |
|
45 | 45 | { |
46 | 46 | return $token->getSign() === $this->sign; |
47 | 47 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | public function getToken() : Mailcode_Parser_Statement_Tokenizer_Token_Operand |
53 | 53 | { |
54 | - if($this->token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Operand) |
|
54 | + if ($this->token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Operand) |
|
55 | 55 | { |
56 | 56 | return $this->token; |
57 | 57 | } |
@@ -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 | } |