Completed
Pull Request — master (#11)
by Aitor Riba
02:38 queued 47s
created
src/Builder/MymemoryTrans.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -5,42 +5,42 @@
 block discarded – undo
5 5
 class MymemoryTrans extends Translation
6 6
 {
7 7
     /**
8
-      * Get translation from mymemory API.
9
-      */
10
-     public function main()
11
-     {
12
-         $host = 'api.mymemory.translated.net';
8
+     * Get translation from mymemory API.
9
+     */
10
+        public function main()
11
+        {
12
+            $host = 'api.mymemory.translated.net';
13 13
 
14
-         // Check if host is online.
15
-         if ($this->checkHost($host)) {
14
+            // Check if host is online.
15
+            if ($this->checkHost($host)) {
16 16
 
17
-             // Host online
18
-             $urlString = urlencode($this->string);
19
-             $url = "http://$host/get?q=$urlString&langpair=$this->from%7C$this->to";
20
-             $json = file_get_contents($url);
21
-             $data = json_decode($json);
17
+                // Host online
18
+                $urlString = urlencode($this->string);
19
+                $url = "http://$host/get?q=$urlString&langpair=$this->from%7C$this->to";
20
+                $json = file_get_contents($url);
21
+                $data = json_decode($json);
22 22
 
23
-             // Checking response status
24
-             if ($data->responseStatus != 200) {
25
-                 if ($this->debug == true) {
26
-                     $details = $data->responseDetails;
27
-                     if ($data->responseStatus == 403) {
28
-                         $details = ($data->responseDetails);
29
-                     }
30
-                     $this->translation = "<font style='color:red;'>Error ".$data->responseStatus.': '.$details.'</font>';
31
-                 }
23
+                // Checking response status
24
+                if ($data->responseStatus != 200) {
25
+                    if ($this->debug == true) {
26
+                        $details = $data->responseDetails;
27
+                        if ($data->responseStatus == 403) {
28
+                            $details = ($data->responseDetails);
29
+                        }
30
+                        $this->translation = "<font style='color:red;'>Error ".$data->responseStatus.': '.$details.'</font>';
31
+                    }
32 32
 
33
-                 return;
34
-             }
33
+                    return;
34
+                }
35 35
 
36 36
 
37
-             $transObtained = $data->responseData->translatedText;
37
+                $transObtained = $data->responseData->translatedText;
38 38
 
39
-             $this->translation = ucfirst(strtolower(trim($transObtained)));
39
+                $this->translation = ucfirst(strtolower(trim($transObtained)));
40 40
 
41
-             $this->checkSave();
41
+                $this->checkSave();
42 42
 
43
-             return;
44
-         }
45
-     }
43
+                return;
44
+            }
45
+        }
46 46
 }
Please login to merge, or discard this patch.
src/Builder/Exception.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,10 +5,10 @@
 block discarded – undo
5 5
 class Exception extends Translation
6 6
 {
7 7
     /**
8
-      * Get translation from mymemory API.
9
-      */
10
-     public function main()
11
-     {
12
-         // Check if it can be translated from online sources.
13
-     }
8
+     * Get translation from mymemory API.
9
+     */
10
+        public function main()
11
+        {
12
+            // Check if it can be translated from online sources.
13
+        }
14 14
 }
Please login to merge, or discard this patch.