Completed
Pull Request — master (#4)
by Jeremy
08:42 queued 04:08
created
app/Http/Controllers/SoundsController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     {
47 47
         $sound = SoundServices::getBlankSound();
48 48
 
49
-        return view('pages.sounds.create', ['sound' => $sound]);
49
+        return view('pages.sounds.create', [ 'sound' => $sound ]);
50 50
     }
51 51
 
52 52
     /**
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     {
78 78
         $sound = SoundServices::getSound($id);
79 79
 
80
-        return view('pages.sounds.show', ['sound' => $sound]);
80
+        return view('pages.sounds.show', [ 'sound' => $sound ]);
81 81
     }
82 82
 
83 83
     /**
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
     {
92 92
         $sound = SoundServices::getSound($id);
93 93
 
94
-        return view('pages.sounds.edit', ['sound' => $sound]);
94
+        return view('pages.sounds.edit', [ 'sound' => $sound ]);
95 95
     }
96 96
 
97 97
     /**
Please login to merge, or discard this patch.
app/Http/Controllers/Api/SoundsController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
         foreach ($sounds as $sound) {
48 48
             $id = $sound->id;
49 49
             foreach ($request->sounds as $soundsNew) {
50
-                if ($soundsNew['id'] == $id) {
51
-                    $sound->update(['sort_order' => $soundsNew['sort_order']]);
50
+                if ($soundsNew[ 'id' ] == $id) {
51
+                    $sound->update([ 'sort_order' => $soundsNew[ 'sort_order' ] ]);
52 52
                 }
53 53
             }
54 54
         }
@@ -75,12 +75,12 @@  discard block
 block discarded – undo
75 75
         $this->validate($request, [
76 76
             'sound.enabled' => 'required|boolean',
77 77
         ]);
78
-        $sound = SoundServices::updateSoundStatus($id, $request->sound['enabled']);
78
+        $sound = SoundServices::updateSoundStatus($id, $request->sound[ 'enabled' ]);
79 79
         $status = 'disabled';
80 80
         if ($sound->enabled) {
81 81
             $status = 'enabled';
82 82
         }
83
-        $message = trans('admin.messages.status-updated', ['status' => $status, 'title' => $sound->title]);
83
+        $message = trans('admin.messages.status-updated', [ 'status' => $status, 'title' => $sound->title ]);
84 84
 
85 85
         ActivityLogger::activity($message);
86 86
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         ActivityLogger::activity('Sounds deleted: '.$sound);
107 107
 
108 108
         return response()->json([
109
-            'message' => trans('admin.messages.sound-deleted', ['title' => $sound->title]),
109
+            'message' => trans('admin.messages.sound-deleted', [ 'title' => $sound->title ]),
110 110
         ], 200);
111 111
     }
112 112
 }
Please login to merge, or discard this patch.