@@ -33,9 +33,9 @@ discard block |
||
33 | 33 | |
34 | 34 | // Checking whether from_lang or to_lang are set as app_locale. |
35 | 35 | |
36 | - if ($this->from == 'app_locale') {$this->from = App::getLocale();} |
|
36 | + if ($this->from == 'app_locale') {$this->from = App::getLocale(); } |
|
37 | 37 | |
38 | - if ($this->to == 'app_locale') {$this->to = App::getLocale();} |
|
38 | + if ($this->to == 'app_locale') {$this->to = App::getLocale(); } |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | } |
114 | 114 | |
115 | 115 | |
116 | - $available_transoltors = ['apertium', 'mymemory']; |
|
116 | + $available_transoltors = [ 'apertium', 'mymemory' ]; |
|
117 | 117 | |
118 | 118 | // Checks available translators. |
119 | 119 | |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | // Check if it can be translated from online sources. |
144 | 144 | |
145 | 145 | $host = 'api.mymemory.translated.net'; |
146 | - if($socket =@ fsockopen($host, 80, $errno, $errstr, 30)) { |
|
146 | + if ($socket = @ fsockopen($host, 80, $errno, $errstr, 30)) { |
|
147 | 147 | |
148 | 148 | // Host online |
149 | 149 | $urlString = urlencode($this->string); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | if ($this->debug == true) { |
158 | 158 | $details = $data->responseDetails; |
159 | 159 | if ($data->responseStatus == 403) { |
160 | - $details =($data->responseDetails); |
|
160 | + $details = ($data->responseDetails); |
|
161 | 161 | } |
162 | 162 | $this->translation = "<font style='color:red;'>Error ".$data->responseStatus.": ".$details."</font>"; |
163 | 163 | } |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | // Check if it can be translated from online sources. |
198 | 198 | |
199 | 199 | $host = 'api.apertium.org'; |
200 | - if($socket =@ fsockopen($host, 80, $errno, $errstr, 30)) { |
|
200 | + if ($socket = @ fsockopen($host, 80, $errno, $errstr, 30)) { |
|
201 | 201 | |
202 | 202 | // Host online |
203 | 203 | |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | $words = explode(' ', $transObtained); |
230 | 230 | foreach ($words as $word) { |
231 | 231 | if ($word != '') { |
232 | - if ($word[0] == '*') { |
|
232 | + if ($word[ 0 ] == '*') { |
|
233 | 233 | $errors = $errors.substr($word, 1).', '; |
234 | 234 | } |
235 | 235 | } |