@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | // IF type. |
| 40 | 40 | $method = 'translate'.$this->getIfType($command); |
| 41 | 41 | |
| 42 | - if(method_exists($this, $method)) |
|
| 42 | + if (method_exists($this, $method)) |
|
| 43 | 43 | { |
| 44 | 44 | return strval($this->$method($command)); |
| 45 | 45 | } |
@@ -53,11 +53,11 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | $keywords = $command->getLogicKeywords()->getKeywords(); |
| 55 | 55 | |
| 56 | - foreach($keywords as $keyword) |
|
| 56 | + foreach ($keywords as $keyword) |
|
| 57 | 57 | { |
| 58 | 58 | $keyCommand = $keyword->getCommand(); |
| 59 | 59 | |
| 60 | - if($keyCommand instanceof Mailcode_Commands_IfBase) |
|
| 60 | + if ($keyCommand instanceof Mailcode_Commands_IfBase) |
|
| 61 | 61 | { |
| 62 | 62 | $body .= ' '.$this->getSign($keyword).' '.$this->translateBody($keyCommand); |
| 63 | 63 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | |
| 81 | 81 | protected function getSign(Mailcode_Commands_LogicKeywords_Keyword $keyword) : string |
| 82 | 82 | { |
| 83 | - switch($keyword->getName()) |
|
| 83 | + switch ($keyword->getName()) |
|
| 84 | 84 | { |
| 85 | 85 | case 'and': |
| 86 | 86 | return '&&'; |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | { |
| 104 | 104 | $sign = ''; |
| 105 | 105 | |
| 106 | - if($notEmpty) |
|
| 106 | + if ($notEmpty) |
|
| 107 | 107 | { |
| 108 | 108 | $sign = '!'; |
| 109 | 109 | } |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | { |
| 120 | 120 | $params = $command->getParams(); |
| 121 | 121 | |
| 122 | - if(!$params) |
|
| 122 | + if (!$params) |
|
| 123 | 123 | { |
| 124 | 124 | return ''; |
| 125 | 125 | } |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | $test = strtolower(trim($value, '"')); |
| 133 | 133 | $fullName = $variable->getFullName(); |
| 134 | 134 | |
| 135 | - if(in_array($test, array('true', 'false'))) |
|
| 135 | + if (in_array($test, array('true', 'false'))) |
|
| 136 | 136 | { |
| 137 | 137 | $fullName .= '.toLowerCase()'; |
| 138 | 138 | $value = '"'.$test.'"'; |
@@ -159,12 +159,12 @@ discard block |
||
| 159 | 159 | $varName = $variable->getFullName(); |
| 160 | 160 | |
| 161 | 161 | $opts = 's'; |
| 162 | - if($caseSensitive) |
|
| 162 | + if ($caseSensitive) |
|
| 163 | 163 | { |
| 164 | 164 | $opts = 'is'; |
| 165 | 165 | } |
| 166 | 166 | |
| 167 | - foreach($searchTerms as $token) |
|
| 167 | + foreach ($searchTerms as $token) |
|
| 168 | 168 | { |
| 169 | 169 | $parts[] = sprintf( |
| 170 | 170 | '%s.matches("(?%s)%s")', |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | protected function _translateSearch(string $mode, Mailcode_Variables_Variable $variable, bool $caseSensitive, string $searchTerm) : string |
| 181 | 181 | { |
| 182 | 182 | $method = $mode.'With'; |
| 183 | - if($caseSensitive) |
|
| 183 | + if ($caseSensitive) |
|
| 184 | 184 | { |
| 185 | 185 | $method = $mode.'WithIgnoreCase'; |
| 186 | 186 | } |