Completed
Push — master ( c715fc...482a25 )
by Aitor Riba
01:56
created
src/Builder/ApertiumTrans.php 7 patches
Doc Comments   +1 added lines, -6 removed lines patch added patch discarded remove patch
@@ -58,9 +58,4 @@
 block discarded – undo
58 58
                 }
59 59
             }
60 60
 
61
-            $this->checkSave();
62
-
63
-            return;
64
-        }
65
-    }
66
-}
61
+            $this->checkSave
67 62
\ No newline at end of file
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -6 removed lines patch added patch discarded remove patch
@@ -58,9 +58,4 @@
 block discarded – undo
58 58
                 }
59 59
             }
60 60
 
61
-            $this->checkSave();
62
-
63
-            return;
64
-        }
65
-    }
66
-}
61
+            $this->checkSave
67 62
\ No newline at end of file
Please login to merge, or discard this patch.
Indentation   +1 added lines, -6 removed lines patch added patch discarded remove patch
@@ -58,9 +58,4 @@
 block discarded – undo
58 58
                 }
59 59
             }
60 60
 
61
-            $this->checkSave();
62
-
63
-            return;
64
-        }
65
-    }
66
-}
61
+            $this->checkSave
67 62
\ No newline at end of file
Please login to merge, or discard this patch.
Switch Indentation   +1 added lines, -6 removed lines patch added patch discarded remove patch
@@ -58,9 +58,4 @@
 block discarded – undo
58 58
                 }
59 59
             }
60 60
 
61
-            $this->checkSave();
62
-
63
-            return;
64
-        }
65
-    }
66
-}
61
+            $this->checkSave
67 62
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +6 added lines, -11 removed lines patch added patch discarded remove patch
@@ -22,16 +22,16 @@  discard block
 block discarded – undo
22 22
 
23 23
             // Checking response status
24 24
 
25
-            if ($data['responseStatus'] != 200) {
25
+            if ($data[ 'responseStatus' ] != 200) {
26 26
                 if ($this->debug === true) {
27
-                    $this->translation = "<font style='color:red;'>Error ".$data['responseStatus'].': '.$data['responseDetails'] .'</font>';
27
+                    $this->translation = "<font style='color:red;'>Error ".$data[ 'responseStatus' ].': '.$data[ 'responseDetails' ].'</font>';
28 28
                 }
29 29
 
30 30
                 return;
31 31
             }
32 32
 
33
-<<<<<<< HEAD
34
-            $transObtained = $data['responseData']['translatedText'];
33
+<< << <<< HEAD
34
+            $transObtained = $data[ 'responseData']['translatedText'];
35 35
 =======
36 36
             $transObtained = $data->responseData->translatedText;
37 37
 >>>>>>> origin/master
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
                 $words = explode(' ', $transObtained);
46 46
                 foreach ($words as $word) {
47 47
                     if ($word != '') {
48
-                        if ($word[0] == '*') {
48
+                        if ($word[ 0 ] == '*') {
49 49
                             $errors = $errors.substr($word, 1).', ';
50 50
                         }
51 51
                     }
@@ -58,9 +58,4 @@  discard block
 block discarded – undo
58 58
                 }
59 59
             }
60 60
 
61
-            $this->checkSave();
62
-
63
-            return;
64
-        }
65
-    }
66
-}
61
+            $this->checkSave
67 62
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +1 added lines, -6 removed lines patch added patch discarded remove patch
@@ -58,9 +58,4 @@
 block discarded – undo
58 58
                 }
59 59
             }
60 60
 
61
-            $this->checkSave();
62
-
63
-            return;
64
-        }
65
-    }
66
-}
61
+            $this->checkSave
67 62
\ No newline at end of file
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -6 removed lines patch added patch discarded remove patch
@@ -58,9 +58,4 @@
 block discarded – undo
58 58
                 }
59 59
             }
60 60
 
61
-            $this->checkSave();
62
-
63
-            return;
64
-        }
65
-    }
66
-}
61
+            $this->checkSave
67 62
\ No newline at end of file
Please login to merge, or discard this patch.
src/Builder/MymemoryTrans.php 7 patches
Doc Comments   +1 added lines, -6 removed lines patch added patch discarded remove patch
@@ -39,9 +39,4 @@
 block discarded – undo
39 39
              $this->translation = ucfirst(strtolower(trim($transObtained)));
40 40
 >>>>>>> origin/master
41 41
 
42
-             $this->checkSave();
43
-
44
-             return;
45
-         }
46
-     }
47
-}
42
+             $this->checkSave
48 43
\ No newline at end of file
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -6 removed lines patch added patch discarded remove patch
@@ -39,9 +39,4 @@
 block discarded – undo
39 39
              $this->translation = ucfirst(strtolower(trim($transObtained)));
40 40
 >>>>>>> origin/master
41 41
 
42
-             $this->checkSave();
43
-
44
-             return;
45
-         }
46
-     }
47
-}
42
+             $this->checkSave
48 43
\ No newline at end of file
Please login to merge, or discard this patch.
Indentation   +26 added lines, -31 removed lines patch added patch discarded remove patch
@@ -5,31 +5,31 @@  discard block
 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';
13
-
14
-         // Check if host is online.
15
-         if ($this->checkHost($host)) {
16
-
17
-             // Host online
18
-             $urlString = urlencode($this->string);
19
-             $urldata = file_get_contents("http://$host/get?q=$urlString&langpair=$this->from|$this->to");
20
-             $data = json_decode($urldata, true);
21
-
22
-             if ($data['responseStatus'] != 200) {
23
-                 if ($this->debug == true) {
24
-                     if ($data['responseStatus'] == 403) {
25
-                         $details = ($data['responseDetails']);
26
-                     } else {
27
-                         $details = $data['responseDetails'];
28
-                     }
29
-                     $this->translation = "<font style='color:red;'>Error ".$data->responseStatus.': '.$details.'</font>';
30
-                 }
31
-                 return;
32
-             }
8
+     * Get translation from mymemory API.
9
+     */
10
+        public function main()
11
+        {
12
+            $host = 'api.mymemory.translated.net';
13
+
14
+            // Check if host is online.
15
+            if ($this->checkHost($host)) {
16
+
17
+                // Host online
18
+                $urlString = urlencode($this->string);
19
+                $urldata = file_get_contents("http://$host/get?q=$urlString&langpair=$this->from|$this->to");
20
+                $data = json_decode($urldata, true);
21
+
22
+                if ($data['responseStatus'] != 200) {
23
+                    if ($this->debug == true) {
24
+                        if ($data['responseStatus'] == 403) {
25
+                            $details = ($data['responseDetails']);
26
+                        } else {
27
+                            $details = $data['responseDetails'];
28
+                        }
29
+                        $this->translation = "<font style='color:red;'>Error ".$data->responseStatus.': '.$details.'</font>';
30
+                    }
31
+                    return;
32
+                }
33 33
 
34 34
 <<<<<<< HEAD
35 35
              $this->translation = $data['responseData']['translatedText'];
@@ -39,9 +39,4 @@  discard block
 block discarded – undo
39 39
              $this->translation = ucfirst(strtolower(trim($transObtained)));
40 40
 >>>>>>> origin/master
41 41
 
42
-             $this->checkSave();
43
-
44
-             return;
45
-         }
46
-     }
47
-}
42
+             $this->checkSave
48 43
\ No newline at end of file
Please login to merge, or discard this patch.
Switch Indentation   +1 added lines, -6 removed lines patch added patch discarded remove patch
@@ -39,9 +39,4 @@
 block discarded – undo
39 39
              $this->translation = ucfirst(strtolower(trim($transObtained)));
40 40
 >>>>>>> origin/master
41 41
 
42
-             $this->checkSave();
43
-
44
-             return;
45
-         }
46
-     }
47
-}
42
+             $this->checkSave
48 43
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +7 added lines, -12 removed lines patch added patch discarded remove patch
@@ -19,29 +19,24 @@
 block discarded – undo
19 19
              $urldata = file_get_contents("http://$host/get?q=$urlString&langpair=$this->from|$this->to");
20 20
              $data = json_decode($urldata, true);
21 21
 
22
-             if ($data['responseStatus'] != 200) {
22
+             if ($data[ 'responseStatus' ] != 200) {
23 23
                  if ($this->debug == true) {
24
-                     if ($data['responseStatus'] == 403) {
25
-                         $details = ($data['responseDetails']);
24
+                     if ($data[ 'responseStatus' ] == 403) {
25
+                         $details = ($data[ 'responseDetails' ]);
26 26
                      } else {
27
-                         $details = $data['responseDetails'];
27
+                         $details = $data[ 'responseDetails' ];
28 28
                      }
29 29
                      $this->translation = "<font style='color:red;'>Error ".$data->responseStatus.': '.$details.'</font>';
30 30
                  }
31 31
                  return;
32 32
              }
33 33
 
34
-<<<<<<< HEAD
35
-             $this->translation = $data['responseData']['translatedText'];
34
+<< << <<< HEAD
35
+             $this->translation = $data[ 'responseData']['translatedText'];
36 36
 =======
37 37
              $transObtained = $data->responseData->translatedText;
38 38
 
39 39
              $this->translation = ucfirst(strtolower(trim($transObtained)));
40 40
 >>>>>>> origin/master
41 41
 
42
-             $this->checkSave();
43
-
44
-             return;
45
-         }
46
-     }
47
-}
42
+             $this->checkSave
48 43
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +1 added lines, -6 removed lines patch added patch discarded remove patch
@@ -39,9 +39,4 @@
 block discarded – undo
39 39
              $this->translation = ucfirst(strtolower(trim($transObtained)));
40 40
 >>>>>>> origin/master
41 41
 
42
-             $this->checkSave();
43
-
44
-             return;
45
-         }
46
-     }
47
-}
42
+             $this->checkSave
48 43
\ No newline at end of file
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -6 removed lines patch added patch discarded remove patch
@@ -39,9 +39,4 @@
 block discarded – undo
39 39
              $this->translation = ucfirst(strtolower(trim($transObtained)));
40 40
 >>>>>>> origin/master
41 41
 
42
-             $this->checkSave();
43
-
44
-             return;
45
-         }
46
-     }
47
-}
42
+             $this->checkSave
48 43
\ No newline at end of file
Please login to merge, or discard this patch.
src/Builder/Translation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@
 block discarded – undo
117 117
         if ($this->debug === true) {
118 118
             $this->translation = "<font style='color:#00CC00;'>Translation loaded from DB</font>";
119 119
         } else {
120
-            $this->translation = ($existing[0]->translation);
120
+            $this->translation = ($existing[ 0 ]->translation);
121 121
         }
122 122
 
123 123
         return true;
Please login to merge, or discard this patch.
src/Views/translations.blade.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 	$('#delete').click(function() {
233 233
 		var trans_id = $('.trans-id').val();
234 234
 		<?php $url_route = url('/').'/'.config('laralang.default.prefix').'/delete';
235
-		?>
235
+        ?>
236 236
 		$.ajax({
237 237
 			type: "POST",
238 238
 			url: "{{ $url_route }}",
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 
249 249
 	$('#delete-all-button-confirm').click(function() {
250 250
 		<?php $url_route = url('/').'/'.config('laralang.default.prefix').'/delete/all';
251
-		?>
251
+        ?>
252 252
 		$.ajax({
253 253
 			type: "POST",
254 254
 			url: "{{ $url_route }}",
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 	$('#edit').click(function() {
266 266
 		var trans_id = $('.trans-id').val();
267 267
 		<?php $url_route = url('/').'/'.config('laralang.default.prefix').'/edit';
268
-		?>
268
+        ?>
269 269
 		$.ajax({
270 270
 			type: "POST",
271 271
 			url: "{{ $url_route }}",
Please login to merge, or discard this patch.
src/Controllers/LaralangController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
     public function login(Request $request)
23 23
     {
24
-        session(['laralang.password' => Crypt::encrypt($request->input('password'))]);
24
+        session([ 'laralang.password' => Crypt::encrypt($request->input('password')) ]);
25 25
         if (Crypt::decrypt(session('laralang.password')) != config('laralang.default.password')) {
26 26
             return redirect(Route('laralang::login'))
27 27
             ->with('status', 'Invalid password');
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     public function deleteAllTranslations()
57 57
     {
58 58
         $trans = DB_Translation::all();
59
-        foreach ($trans as $tran){
59
+        foreach ($trans as $tran) {
60 60
             $tran->delete();
61 61
         }
62 62
     }
Please login to merge, or discard this patch.