Completed
Push — master ( fe4246...347d29 )
by Aitor Riba
01:49
created
src/Controllers/LaralangController.php 1 patch
Spacing   +5 added lines, -5 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');
@@ -44,15 +44,15 @@  discard block
 block discarded – undo
44 44
 
45 45
     public function api()
46 46
     {
47
-        $cod =[];
47
+        $cod = [ ];
48 48
         $to_cod = DB_Translation::all();
49 49
         foreach ($to_cod as $toc) {
50
-            if (mb_check_encoding(utf8_decode($toc['translation']), 'UTF-8')) {
51
-                $coded = utf8_decode($toc['translation']);
50
+            if (mb_check_encoding(utf8_decode($toc[ 'translation' ]), 'UTF-8')) {
51
+                $coded = utf8_decode($toc[ 'translation' ]);
52 52
             } else {
53 53
                 $coded = 'Error decoding, unkown chars';
54 54
             }
55
-            $toc['translation'] = $coded;
55
+            $toc[ 'translation' ] = $coded;
56 56
             array_push($cod, $toc);
57 57
         }
58 58
         return Response::json($cod);
Please login to merge, or discard this patch.