@@ -24,7 +24,7 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | public function register() |
| 26 | 26 | { |
| 27 | - app()->singleton('MediaCache', function () { |
|
| 27 | + app()->singleton('MediaCache', function() { |
|
| 28 | 28 | return new MediaCache(); |
| 29 | 29 | }); |
| 30 | 30 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | public function register() |
| 26 | 26 | { |
| 27 | - app()->singleton('Util', function () { |
|
| 27 | + app()->singleton('Util', function() { |
|
| 28 | 28 | return new Util(); |
| 29 | 29 | }); |
| 30 | 30 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | public function register() |
| 26 | 26 | { |
| 27 | - app()->singleton('YouTube', function () { |
|
| 27 | + app()->singleton('YouTube', function() { |
|
| 28 | 28 | return new YouTube(); |
| 29 | 29 | }); |
| 30 | 30 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | public function register() |
| 26 | 26 | { |
| 27 | - app()->singleton('Download', function () { |
|
| 27 | + app()->singleton('Download', function() { |
|
| 28 | 28 | return new Download(); |
| 29 | 29 | }); |
| 30 | 30 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | public function register() |
| 26 | 26 | { |
| 27 | - app()->singleton('Media', function () { |
|
| 27 | + app()->singleton('Media', function() { |
|
| 28 | 28 | return new Media(); |
| 29 | 29 | }); |
| 30 | 30 | } |
@@ -37,12 +37,12 @@ |
||
| 37 | 37 | parent::boot(); |
| 38 | 38 | |
| 39 | 39 | // Generate a unique hash for a song from its path to be the ID |
| 40 | - Song::creating(function ($song) { |
|
| 40 | + Song::creating(function($song) { |
|
| 41 | 41 | $song->id = File::getHash($song->path); |
| 42 | 42 | }); |
| 43 | 43 | |
| 44 | 44 | // Remove the cover file if the album is deleted |
| 45 | - Album::deleted(function ($album) { |
|
| 45 | + Album::deleted(function($album) { |
|
| 46 | 46 | if ($album->hasCover) { |
| 47 | 47 | @unlink(app()->publicPath().'/public/img/covers/'.$album->cover); |
| 48 | 48 | } |
@@ -130,7 +130,7 @@ |
||
| 130 | 130 | */ |
| 131 | 131 | public static function batchUnlike(array $songIds, User $user) |
| 132 | 132 | { |
| 133 | - self::whereIn('song_id', $songIds)->whereUserId($user->id)->get()->each(function ($interaction) { |
|
| 133 | + self::whereIn('song_id', $songIds)->whereUserId($user->id)->get()->each(function($interaction) { |
|
| 134 | 134 | $interaction->liked = false; |
| 135 | 135 | $interaction->save(); |
| 136 | 136 | |
@@ -94,7 +94,7 @@ |
||
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | // Delete non-existing songs. |
| 97 | - $hashes = array_map(function ($f) { |
|
| 97 | + $hashes = array_map(function($f) { |
|
| 98 | 98 | return self::getHash($f->getPath()); |
| 99 | 99 | }, array_merge($results['ugly'], $results['good'])); |
| 100 | 100 | |
@@ -120,7 +120,7 @@ |
||
| 120 | 120 | // 'duplicated-name.mp3' => currentFileIndex |
| 121 | 121 | ]; |
| 122 | 122 | |
| 123 | - $songs->each(function ($s) use ($zip, &$localNames) { |
|
| 123 | + $songs->each(function($s) use ($zip, &$localNames) { |
|
| 124 | 124 | try { |
| 125 | 125 | $path = $this->fromSong($s); |
| 126 | 126 | |