Completed
Push — master ( 613948...e57d0a )
by Jeremy
05:41 queued 11s
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/Services/UserServices.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     public static function checkIsUserAdminOrHigher($userId)
27 27
     {
28 28
         $user = self::getUser($userId);
29
-        if (!$user->hasRole(['admin', 'super.admin'])) {
29
+        if (!$user->hasRole([ 'admin', 'super.admin' ])) {
30 30
             abort(401);
31 31
         }
32 32
     }
Please login to merge, or discard this patch.
app/Providers/TelescopeServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
         $this->hideSensitiveRequestDetails();
22 22
 
23
-        Telescope::filter(function (IncomingEntry $entry) {
23
+        Telescope::filter(function(IncomingEntry $entry) {
24 24
             if ($this->app->isLocal()) {
25 25
                 return true;
26 26
             }
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
             return;
44 44
         }
45 45
 
46
-        Telescope::hideRequestParameters(['_token']);
46
+        Telescope::hideRequestParameters([ '_token' ]);
47 47
 
48 48
         Telescope::hideRequestHeaders([
49 49
             'cookie',
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     protected function gate()
63 63
     {
64
-        Gate::define('viewTelescope', function ($user) {
64
+        Gate::define('viewTelescope', function($user) {
65 65
             return in_array($user->email, [
66 66
                 //
67 67
             ]);
Please login to merge, or discard this patch.
app/Console/Commands/GetSeededSoundFiles.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,10 +37,10 @@
 block discarded – undo
37 37
      */
38 38
     public function handle()
39 39
     {
40
-        $uploadsFolder = 'public/' . config('soundboard.folders.uploads');
40
+        $uploadsFolder = 'public/'.config('soundboard.folders.uploads');
41 41
 
42
-        echo shell_exec('rm -R -f ' . $uploadsFolder);
43
-        echo shell_exec('git clone '.config('soundboard.seededSoundsRepository') .' ' . $uploadsFolder);
44
-        echo shell_exec('rm -f ' . $uploadsFolder . '/LICENSE ' . $uploadsFolder . '/README.md');
42
+        echo shell_exec('rm -R -f '.$uploadsFolder);
43
+        echo shell_exec('git clone '.config('soundboard.seededSoundsRepository').' '.$uploadsFolder);
44
+        echo shell_exec('rm -f '.$uploadsFolder.'/LICENSE '.$uploadsFolder.'/README.md');
45 45
     }
46 46
 }
Please login to merge, or discard this patch.
app/Console/Commands/GetSoundFiles.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,10 +37,10 @@
 block discarded – undo
37 37
      */
38 38
     public function handle()
39 39
     {
40
-        $uploadsFolder = 'public/' . config('soundboard.folders.uploads');
40
+        $uploadsFolder = 'public/'.config('soundboard.folders.uploads');
41 41
 
42
-        echo shell_exec('rm -R -f ' . $uploadsFolder);
43
-        echo shell_exec('git clone '.config('soundboard.soundsRepository') .' ' . $uploadsFolder);
42
+        echo shell_exec('rm -R -f '.$uploadsFolder);
43
+        echo shell_exec('git clone '.config('soundboard.soundsRepository').' '.$uploadsFolder);
44 44
         echo shell_exec('rm -f public/sound-files/LICENSE public/sound-files/README.md');
45 45
     }
46 46
 }
Please login to merge, or discard this patch.
app/Http/Controllers/Api/ApiSoundsController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
         foreach ($sounds as $sound) {
50 50
             $id = $sound->id;
51 51
             foreach ($request->sounds as $soundsNew) {
52
-                if ($soundsNew['id'] == $id) {
53
-                    $sound->update(['sort_order' => $soundsNew['sort_order']]);
52
+                if ($soundsNew[ 'id' ] == $id) {
53
+                    $sound->update([ 'sort_order' => $soundsNew[ 'sort_order' ] ]);
54 54
                 }
55 55
             }
56 56
         }
@@ -77,12 +77,12 @@  discard block
 block discarded – undo
77 77
         $this->validate($request, [
78 78
             'sound.enabled' => 'required|boolean',
79 79
         ]);
80
-        $sound = SoundServices::updateSoundStatus($id, $request->sound['enabled']);
80
+        $sound = SoundServices::updateSoundStatus($id, $request->sound[ 'enabled' ]);
81 81
         $status = 'disabled';
82 82
         if ($sound->enabled) {
83 83
             $status = 'enabled';
84 84
         }
85
-        $message = trans('admin.messages.status-updated', ['status' => $status, 'title' => $sound->title]);
85
+        $message = trans('admin.messages.status-updated', [ 'status' => $status, 'title' => $sound->title ]);
86 86
 
87 87
         ActivityLogger::activity($message);
88 88
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         ActivityLogger::activity('Sounds deleted: '.$sound);
109 109
 
110 110
         return response()->json([
111
-            'message' => trans('admin.messages.sound-deleted', ['title' => $sound->title]),
111
+            'message' => trans('admin.messages.sound-deleted', [ 'title' => $sound->title ]),
112 112
         ], 200);
113 113
     }
114 114
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
             $extension = 'wav';
132 132
             $name = $original_name.'.'.$extension;
133 133
 
134
-            $path = config('soundboard.folders.recordings') . "/";
134
+            $path = config('soundboard.folders.recordings')."/";
135 135
             if (!File::exists($path)) {
136 136
                 File::makeDirectory($path);
137 137
             }
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
             }
147 147
             $storedFile = $file->storeAs(config('soundboard.folders.recordings'), $name, config('soundboard.folders.uploads'));
148 148
 
149
-            ActivityLogger::activity('New file recorded: ' . $name);
149
+            ActivityLogger::activity('New file recorded: '.$name);
150 150
 
151 151
             return response()->json([
152 152
                 'message' => 'File Recorded: '.$name,
Please login to merge, or discard this patch.
app/Services/SoundServices.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
     public static function storeNewSound($soundData)
102 102
     {
103 103
         $lastSound = collect(Sound::sortedSounds()->get())->last();
104
-        $sort_order = ['sort_order' => $lastSound->sort_order + 1];
104
+        $sort_order = [ 'sort_order' => $lastSound->sort_order + 1 ];
105 105
         $newSound = Sound::create(array_merge($soundData, $sort_order));
106 106
 
107 107
         return $newSound;
@@ -128,8 +128,8 @@  discard block
 block discarded – undo
128 128
      */
129 129
     public static function checkAndPullSoundsAndRecordings()
130 130
     {
131
-        $uploadedFilePath = config('soundboard.folders.uploads') . "/";
132
-        $recordedFilePath = $uploadedFilePath . config('soundboard.folders.recordings') . "/";
131
+        $uploadedFilePath = config('soundboard.folders.uploads')."/";
132
+        $recordedFilePath = $uploadedFilePath.config('soundboard.folders.recordings')."/";
133 133
         $fileTypes = 'wav';
134 134
 
135 135
         if (!File::exists($uploadedFilePath)) {
@@ -140,8 +140,8 @@  discard block
 block discarded – undo
140 140
             File::makeDirectory($recordedFilePath);
141 141
         }
142 142
 
143
-        $uploadfilesNames = collect(preg_grep('~\.(' . $fileTypes . ')$~', scandir($uploadedFilePath)));
144
-        $recordedfilesNames = collect(preg_grep('~\.(' . $fileTypes . ')$~', scandir($recordedFilePath)));
143
+        $uploadfilesNames = collect(preg_grep('~\.('.$fileTypes.')$~', scandir($uploadedFilePath)));
144
+        $recordedfilesNames = collect(preg_grep('~\.('.$fileTypes.')$~', scandir($recordedFilePath)));
145 145
 
146 146
         $data = [
147 147
             'uploadfilesNames'  => $uploadfilesNames,
Please login to merge, or discard this patch.