From b8fa6cb1f72d928b26ef07f6ecb6cc4dc69bf27e Mon Sep 17 00:00:00 2001 From: Laravel Shift Date: Sun, 14 Feb 2021 19:45:36 +0000 Subject: [PATCH 01/12] Modernize PHP syntax PHP 7 adopts a short array syntax as well as prefers single quoted string were possible. --- app/Library/ZipStream.php | 2 +- app/Library/getid3/demos/demo.mp3header.php | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Library/ZipStream.php b/app/Library/ZipStream.php index f820d3e8..fbd34ed6 100644 --- a/app/Library/ZipStream.php +++ b/app/Library/ZipStream.php @@ -557,7 +557,7 @@ class ZipStream */ public static function getRelativePath($path) { - $path = preg_replace("#/+\.?/+#", '/', str_replace('\\', '/', $path)); + $path = preg_replace('#/+\\.?/+#', '/', str_replace('\\', '/', $path)); $dirs = explode('/', rtrim(preg_replace('#^(?:\./)+#', '', $path), '/')); $offset = 0; diff --git a/app/Library/getid3/demos/demo.mp3header.php b/app/Library/getid3/demos/demo.mp3header.php index 8d39c927..7b97d9ac 100644 --- a/app/Library/getid3/demos/demo.mp3header.php +++ b/app/Library/getid3/demos/demo.mp3header.php @@ -1427,15 +1427,15 @@ if (! function_exists('IsValidURL')) { if ($parts = safe_parse_url($url)) { if (($parts['scheme'] != 'http') && ($parts['scheme'] != 'https') && ($parts['scheme'] != 'ftp') && ($parts['scheme'] != 'gopher')) { return false; - } elseif (! preg_match("#^[[:alnum:]]([-.]?[0-9a-z])*\.[a-z]{2,3}#i$", $parts['host'], $regs) && ! preg_match('#^[0-9]{1,3}(\.[0-9]{1,3}){3}$#', $parts['host'])) { + } elseif (! preg_match('#^[[:alnum:]]([-.]?[0-9a-z])*\\.[a-z]{2,3}#i$', $parts['host'], $regs) && ! preg_match('#^[0-9]{1,3}(\.[0-9]{1,3}){3}$#', $parts['host'])) { return false; - } elseif (! preg_match("#^([[:alnum:]-]|[\_])*$#i", $parts['user'], $regs)) { + } elseif (! preg_match('#^([[:alnum:]-]|[\\_])*$#i', $parts['user'], $regs)) { return false; - } elseif (! preg_match("#^([[:alnum:]-]|[\_])*$#i", $parts['pass'], $regs)) { + } elseif (! preg_match('#^([[:alnum:]-]|[\\_])*$#i', $parts['pass'], $regs)) { return false; - } elseif (! preg_match("#^[[:alnum:]/_\.@~-]*$#i", $parts['path'], $regs)) { + } elseif (! preg_match('#^[[:alnum:]/_\\.@~-]*$#i', $parts['path'], $regs)) { return false; - } elseif (! preg_match("#^[[:alnum:]?&=+:;_()%#/,\.-]*$#i", $parts['query'], $regs)) { + } elseif (! preg_match('#^[[:alnum:]?&=+:;_()%#/,\\.-]*$#i', $parts['query'], $regs)) { return false; } else { return true; From 2a62eaa50ab7f4b33929f03608c1c09e48a299c2 Mon Sep 17 00:00:00 2001 From: Laravel Shift Date: Sun, 14 Feb 2021 19:45:51 +0000 Subject: [PATCH 02/12] Global Facades --- app/Commands/AddTrackToPlaylistCommand.php | 6 +++--- app/Commands/CreateAlbumCommand.php | 6 +++--- app/Commands/CreateAnnouncementCommand.php | 4 ++-- app/Commands/CreateCommentCommand.php | 6 +++--- app/Commands/CreateGenreCommand.php | 4 ++-- app/Commands/CreatePlaylistCommand.php | 6 +++--- app/Commands/CreateShowSongCommand.php | 4 ++-- app/Commands/CreateUserCommand.php | 4 ++-- app/Commands/DeleteAlbumCommand.php | 4 ++-- app/Commands/DeleteGenreCommand.php | 4 ++-- app/Commands/DeletePlaylistCommand.php | 2 +- app/Commands/DeleteShowSongCommand.php | 4 ++-- app/Commands/DeleteTrackCommand.php | 2 +- app/Commands/EditAlbumCommand.php | 8 ++++---- app/Commands/EditPlaylistCommand.php | 4 ++-- app/Commands/EditTrackCommand.php | 6 +++--- app/Commands/GenerateTrackFilesCommand.php | 2 +- app/Commands/MergeAccountsCommand.php | 2 +- app/Commands/ParseTrackTagsCommand.php | 4 ++-- app/Commands/RemoveTrackFromPlaylistCommand.php | 4 ++-- app/Commands/RenameGenreCommand.php | 4 ++-- app/Commands/RenameShowSongCommand.php | 4 ++-- app/Commands/SaveAccountSettingsCommand.php | 6 +++--- app/Commands/ToggleFavouriteCommand.php | 6 +++--- app/Commands/ToggleFollowingCommand.php | 4 ++-- app/Commands/UploadTrackCommand.php | 8 ++++---- app/Console/Commands/ClassifyMLPMA.php | 2 +- app/Console/Commands/ClearTrackCache.php | 2 +- app/Console/Commands/FixMLPMAImages.php | 6 +++--- app/Console/Commands/ImportEQBeats.php | 8 ++++---- app/Console/Commands/MergeAccounts.php | 2 +- app/Console/Commands/MigrateOldData.php | 2 +- app/Console/Commands/RebuildFilesizes.php | 2 +- app/Console/Commands/RebuildTrackCache.php | 2 +- app/Console/Commands/RefreshCache.php | 2 +- app/Console/Commands/VersionFiles.php | 2 +- app/Http/Controllers/AccountController.php | 6 +++--- app/Http/Controllers/AdminController.php | 2 +- app/Http/Controllers/AlbumsController.php | 6 +++--- app/Http/Controllers/Api/Mobile/TracksController.php | 2 +- app/Http/Controllers/Api/V1/TracksController.php | 2 +- app/Http/Controllers/Api/Web/AccountController.php | 8 ++++---- app/Http/Controllers/Api/Web/AlbumsController.php | 6 +++--- .../Controllers/Api/Web/AnnouncementsController.php | 4 ++-- app/Http/Controllers/Api/Web/ArtistsController.php | 6 +++--- app/Http/Controllers/Api/Web/CommentsController.php | 4 ++-- app/Http/Controllers/Api/Web/DashboardController.php | 4 ++-- .../Controllers/Api/Web/FavouritesController.php | 4 ++-- app/Http/Controllers/Api/Web/GenresController.php | 2 +- app/Http/Controllers/Api/Web/ImagesController.php | 4 ++-- .../Controllers/Api/Web/NotificationsController.php | 2 +- app/Http/Controllers/Api/Web/PlaylistsController.php | 4 ++-- app/Http/Controllers/Api/Web/SearchController.php | 2 +- app/Http/Controllers/Api/Web/ShowSongsController.php | 2 +- app/Http/Controllers/Api/Web/StatsController.php | 8 ++++---- .../Controllers/Api/Web/TaxonomiesController.php | 2 +- app/Http/Controllers/Api/Web/TracksController.php | 6 +++--- app/Http/Controllers/ApiControllerBase.php | 2 +- app/Http/Controllers/ArtistsController.php | 6 +++--- app/Http/Controllers/AuthController.php | 10 +++++----- app/Http/Controllers/ContentController.php | 2 +- app/Http/Controllers/HomeController.php | 2 +- app/Http/Controllers/ImagesController.php | 8 ++++---- app/Http/Controllers/NotificationsController.php | 8 ++++---- app/Http/Controllers/PlaylistsController.php | 8 ++++---- app/Http/Controllers/StatsController.php | 2 +- app/Http/Controllers/TracksController.php | 12 ++++++------ app/Http/Controllers/UploaderController.php | 2 +- app/Http/Middleware/Authorize.php | 2 +- app/Http/Middleware/DisabledAccountCheck.php | 2 +- app/Jobs/DeleteGenre.php | 4 ++-- app/Jobs/DeleteShowSong.php | 4 ++-- app/Jobs/EncodeTrackFile.php | 8 ++++---- app/Jobs/Job.php | 4 ++-- app/Jobs/UpdateSearchIndexForEntity.php | 2 +- app/Jobs/UpdateTagsForRenamedGenre.php | 8 ++++---- app/Jobs/UpdateTagsForRenamedShowSong.php | 6 +++--- app/Library/Notifications/Drivers/NativeDriver.php | 2 +- app/Library/Notifications/Drivers/PonyfmDriver.php | 4 ++-- app/Library/Search.php | 2 +- app/Models/Album.php | 8 ++++---- app/Models/Comment.php | 2 +- app/Models/Genre.php | 2 +- app/Models/Image.php | 2 +- app/Models/Playlist.php | 6 +++--- app/Models/ResourceLogItem.php | 6 +++--- app/Models/ShowSong.php | 2 +- app/Models/Track.php | 12 ++++++------ app/Models/TrackFile.php | 6 +++--- app/Models/User.php | 6 +++--- app/Providers/AppServiceProvider.php | 2 +- app/Providers/AuthServiceProvider.php | 2 +- app/Traits/IndexedInElasticsearchTrait.php | 2 +- app/Traits/TrackCollection.php | 2 +- 94 files changed, 202 insertions(+), 202 deletions(-) diff --git a/app/Commands/AddTrackToPlaylistCommand.php b/app/Commands/AddTrackToPlaylistCommand.php index 3d7c4bc4..a01e2e36 100644 --- a/app/Commands/AddTrackToPlaylistCommand.php +++ b/app/Commands/AddTrackToPlaylistCommand.php @@ -22,9 +22,9 @@ namespace App\Commands; use App\Models\Playlist; use App\Models\Track; -use Auth; -use DB; -use Validator; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\DB; +use Illuminate\Support\Facades\Validator; class AddTrackToPlaylistCommand extends CommandBase { diff --git a/app/Commands/CreateAlbumCommand.php b/app/Commands/CreateAlbumCommand.php index 39276a5c..913a91df 100644 --- a/app/Commands/CreateAlbumCommand.php +++ b/app/Commands/CreateAlbumCommand.php @@ -23,9 +23,9 @@ namespace App\Commands; use App\Models\Album; use App\Models\Image; use App\Models\User; -use Auth; -use Gate; -use Validator; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Gate; +use Illuminate\Support\Facades\Validator; class CreateAlbumCommand extends CommandBase { diff --git a/app/Commands/CreateAnnouncementCommand.php b/app/Commands/CreateAnnouncementCommand.php index a2b9fbc9..f426a520 100644 --- a/app/Commands/CreateAnnouncementCommand.php +++ b/app/Commands/CreateAnnouncementCommand.php @@ -21,8 +21,8 @@ namespace App\Commands; use App\Models\Announcement; -use Gate; -use Validator; +use Illuminate\Support\Facades\Gate; +use Illuminate\Support\Facades\Validator; class CreateAnnouncementCommand extends CommandBase { diff --git a/app/Commands/CreateCommentCommand.php b/app/Commands/CreateCommentCommand.php index 6971f9e0..b40a7bf2 100644 --- a/app/Commands/CreateCommentCommand.php +++ b/app/Commands/CreateCommentCommand.php @@ -25,9 +25,9 @@ use App\Models\Comment; use App\Models\Playlist; use App\Models\Track; use App\Models\User; -use Auth; -use Notification; -use Validator; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Notification; +use Illuminate\Support\Facades\Validator; class CreateCommentCommand extends CommandBase { diff --git a/app/Commands/CreateGenreCommand.php b/app/Commands/CreateGenreCommand.php index ac32e30f..06bc09f5 100644 --- a/app/Commands/CreateGenreCommand.php +++ b/app/Commands/CreateGenreCommand.php @@ -21,9 +21,9 @@ namespace App\Commands; use App\Models\Genre; -use Gate; +use Illuminate\Support\Facades\Gate; use Illuminate\Support\Str; -use Validator; +use Illuminate\Support\Facades\Validator; class CreateGenreCommand extends CommandBase { diff --git a/app/Commands/CreatePlaylistCommand.php b/app/Commands/CreatePlaylistCommand.php index 94dcac30..a406806e 100644 --- a/app/Commands/CreatePlaylistCommand.php +++ b/app/Commands/CreatePlaylistCommand.php @@ -21,9 +21,9 @@ namespace App\Commands; use App\Models\Playlist; -use Auth; -use Notification; -use Validator; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Notification; +use Illuminate\Support\Facades\Validator; class CreatePlaylistCommand extends CommandBase { diff --git a/app/Commands/CreateShowSongCommand.php b/app/Commands/CreateShowSongCommand.php index 086940b6..2a116ece 100644 --- a/app/Commands/CreateShowSongCommand.php +++ b/app/Commands/CreateShowSongCommand.php @@ -21,9 +21,9 @@ namespace App\Commands; use App\Models\ShowSong; -use Gate; +use Illuminate\Support\Facades\Gate; use Illuminate\Support\Str; -use Validator; +use Illuminate\Support\Facades\Validator; class CreateShowSongCommand extends CommandBase { diff --git a/app/Commands/CreateUserCommand.php b/app/Commands/CreateUserCommand.php index d1d91da9..f63072a1 100644 --- a/app/Commands/CreateUserCommand.php +++ b/app/Commands/CreateUserCommand.php @@ -21,8 +21,8 @@ namespace App\Commands; use App\Models\User; -use Gate; -use Validator; +use Illuminate\Support\Facades\Gate; +use Illuminate\Support\Facades\Validator; class CreateUserCommand extends CommandBase { diff --git a/app/Commands/DeleteAlbumCommand.php b/app/Commands/DeleteAlbumCommand.php index 6b4e6b46..2962767e 100644 --- a/app/Commands/DeleteAlbumCommand.php +++ b/app/Commands/DeleteAlbumCommand.php @@ -21,8 +21,8 @@ namespace App\Commands; use App\Models\Album; -use Auth; -use Gate; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Gate; class DeleteAlbumCommand extends CommandBase { diff --git a/app/Commands/DeleteGenreCommand.php b/app/Commands/DeleteGenreCommand.php index a72e2065..1b7350f8 100644 --- a/app/Commands/DeleteGenreCommand.php +++ b/app/Commands/DeleteGenreCommand.php @@ -22,9 +22,9 @@ namespace App\Commands; use App\Jobs\DeleteGenre; use App\Models\Genre; -use Gate; +use Illuminate\Support\Facades\Gate; use Illuminate\Foundation\Bus\DispatchesJobs; -use Validator; +use Illuminate\Support\Facades\Validator; class DeleteGenreCommand extends CommandBase { diff --git a/app/Commands/DeletePlaylistCommand.php b/app/Commands/DeletePlaylistCommand.php index 4da07676..8a4af391 100644 --- a/app/Commands/DeletePlaylistCommand.php +++ b/app/Commands/DeletePlaylistCommand.php @@ -21,7 +21,7 @@ namespace App\Commands; use App\Models\Playlist; -use Auth; +use Illuminate\Support\Facades\Auth; class DeletePlaylistCommand extends CommandBase { diff --git a/app/Commands/DeleteShowSongCommand.php b/app/Commands/DeleteShowSongCommand.php index 54911c7b..19d554d5 100644 --- a/app/Commands/DeleteShowSongCommand.php +++ b/app/Commands/DeleteShowSongCommand.php @@ -22,9 +22,9 @@ namespace App\Commands; use App\Jobs\DeleteShowSong; use App\Models\ShowSong; -use Gate; +use Illuminate\Support\Facades\Gate; use Illuminate\Foundation\Bus\DispatchesJobs; -use Validator; +use Illuminate\Support\Facades\Validator; class DeleteShowSongCommand extends CommandBase { diff --git a/app/Commands/DeleteTrackCommand.php b/app/Commands/DeleteTrackCommand.php index eac152b7..f561b06c 100644 --- a/app/Commands/DeleteTrackCommand.php +++ b/app/Commands/DeleteTrackCommand.php @@ -21,7 +21,7 @@ namespace App\Commands; use App\Models\Track; -use Gate; +use Illuminate\Support\Facades\Gate; class DeleteTrackCommand extends CommandBase { diff --git a/app/Commands/EditAlbumCommand.php b/app/Commands/EditAlbumCommand.php index 0169cfb7..ec1e428c 100644 --- a/app/Commands/EditAlbumCommand.php +++ b/app/Commands/EditAlbumCommand.php @@ -23,10 +23,10 @@ namespace App\Commands; use App\Models\Album; use App\Models\Image; use App\Models\User; -use Auth; -use DB; -use Gate; -use Validator; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\DB; +use Illuminate\Support\Facades\Gate; +use Illuminate\Support\Facades\Validator; class EditAlbumCommand extends CommandBase { diff --git a/app/Commands/EditPlaylistCommand.php b/app/Commands/EditPlaylistCommand.php index cb93346a..78fa2c4a 100644 --- a/app/Commands/EditPlaylistCommand.php +++ b/app/Commands/EditPlaylistCommand.php @@ -22,8 +22,8 @@ namespace App\Commands; use App\Models\PinnedPlaylist; use App\Models\Playlist; -use Auth; -use Validator; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Validator; class EditPlaylistCommand extends CommandBase { diff --git a/app/Commands/EditTrackCommand.php b/app/Commands/EditTrackCommand.php index 398c6493..d1864f39 100644 --- a/app/Commands/EditTrackCommand.php +++ b/app/Commands/EditTrackCommand.php @@ -26,9 +26,9 @@ use App\Models\Playlist; use App\Models\Track; use App\Models\TrackType; use App\Models\User; -use DB; -use Gate; -use Notification; +use Illuminate\Support\Facades\DB; +use Illuminate\Support\Facades\Gate; +use Illuminate\Support\Facades\Notification; class EditTrackCommand extends CommandBase { diff --git a/app/Commands/GenerateTrackFilesCommand.php b/app/Commands/GenerateTrackFilesCommand.php index cd675723..27fbfc17 100644 --- a/app/Commands/GenerateTrackFilesCommand.php +++ b/app/Commands/GenerateTrackFilesCommand.php @@ -26,7 +26,7 @@ use App\Models\Track; use App\Models\TrackFile; use AudioCache; use FFmpegMovie; -use File; +use Illuminate\Support\Facades\File; use Illuminate\Foundation\Bus\DispatchesJobs; use Illuminate\Support\Str; use SplFileInfo; diff --git a/app/Commands/MergeAccountsCommand.php b/app/Commands/MergeAccountsCommand.php index b1483381..6d1af42b 100644 --- a/app/Commands/MergeAccountsCommand.php +++ b/app/Commands/MergeAccountsCommand.php @@ -34,7 +34,7 @@ use App\Models\ResourceUser; use App\Models\Track; use App\Models\User; use Carbon\Carbon; -use DB; +use Illuminate\Support\Facades\DB; class MergeAccountsCommand extends CommandBase { diff --git a/app/Commands/ParseTrackTagsCommand.php b/app/Commands/ParseTrackTagsCommand.php index e65e6c21..9f222fbd 100755 --- a/app/Commands/ParseTrackTagsCommand.php +++ b/app/Commands/ParseTrackTagsCommand.php @@ -28,8 +28,8 @@ use App\Models\TrackType; use App\Models\User; use AudioCache; use Carbon\Carbon; -use Config; -use File; +use Illuminate\Support\Facades\Config; +use Illuminate\Support\Facades\File; use getID3; use Illuminate\Support\Str; use Symfony\Component\HttpFoundation\File\UploadedFile; diff --git a/app/Commands/RemoveTrackFromPlaylistCommand.php b/app/Commands/RemoveTrackFromPlaylistCommand.php index 3301b711..b580d4ef 100644 --- a/app/Commands/RemoveTrackFromPlaylistCommand.php +++ b/app/Commands/RemoveTrackFromPlaylistCommand.php @@ -22,8 +22,8 @@ namespace App\Commands; use App\Models\Playlist; use App\Models\Track; -use Auth; -use DB; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\DB; class RemoveTrackFromPlaylistCommand extends CommandBase { diff --git a/app/Commands/RenameGenreCommand.php b/app/Commands/RenameGenreCommand.php index 2256eb5b..50397cf0 100644 --- a/app/Commands/RenameGenreCommand.php +++ b/app/Commands/RenameGenreCommand.php @@ -22,10 +22,10 @@ namespace App\Commands; use App\Jobs\UpdateTagsForRenamedGenre; use App\Models\Genre; -use Gate; +use Illuminate\Support\Facades\Gate; use Illuminate\Foundation\Bus\DispatchesJobs; use Illuminate\Support\Str; -use Validator; +use Illuminate\Support\Facades\Validator; class RenameGenreCommand extends CommandBase { diff --git a/app/Commands/RenameShowSongCommand.php b/app/Commands/RenameShowSongCommand.php index 7821aa80..936d4200 100644 --- a/app/Commands/RenameShowSongCommand.php +++ b/app/Commands/RenameShowSongCommand.php @@ -22,10 +22,10 @@ namespace App\Commands; use App\Jobs\UpdateTagsForRenamedShowSong; use App\Models\ShowSong; -use Gate; +use Illuminate\Support\Facades\Gate; use Illuminate\Foundation\Bus\DispatchesJobs; use Illuminate\Support\Str; -use Validator; +use Illuminate\Support\Facades\Validator; class RenameShowSongCommand extends CommandBase { diff --git a/app/Commands/SaveAccountSettingsCommand.php b/app/Commands/SaveAccountSettingsCommand.php index fe6359f2..b571a6fd 100644 --- a/app/Commands/SaveAccountSettingsCommand.php +++ b/app/Commands/SaveAccountSettingsCommand.php @@ -22,9 +22,9 @@ namespace App\Commands; use App\Models\Image; use App\Models\User; -use DB; -use Gate; -use Validator; +use Illuminate\Support\Facades\DB; +use Illuminate\Support\Facades\Gate; +use Illuminate\Support\Facades\Validator; class SaveAccountSettingsCommand extends CommandBase { diff --git a/app/Commands/ToggleFavouriteCommand.php b/app/Commands/ToggleFavouriteCommand.php index ab48d159..1decb6b6 100644 --- a/app/Commands/ToggleFavouriteCommand.php +++ b/app/Commands/ToggleFavouriteCommand.php @@ -26,9 +26,9 @@ use App\Models\Favourite; use App\Models\Playlist; use App\Models\ResourceUser; use App\Models\Track; -use Auth; -use DB; -use Notification; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\DB; +use Illuminate\Support\Facades\Notification; class ToggleFavouriteCommand extends CommandBase { diff --git a/app/Commands/ToggleFollowingCommand.php b/app/Commands/ToggleFollowingCommand.php index d15eb9a9..fca89ad2 100644 --- a/app/Commands/ToggleFollowingCommand.php +++ b/app/Commands/ToggleFollowingCommand.php @@ -22,8 +22,8 @@ namespace App\Commands; use App\Models\Follower; use App\Models\ResourceUser; -use Auth; -use Notification; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Notification; class ToggleFollowingCommand extends CommandBase { diff --git a/app/Commands/UploadTrackCommand.php b/app/Commands/UploadTrackCommand.php index e11fef7f..5d54baae 100644 --- a/app/Commands/UploadTrackCommand.php +++ b/app/Commands/UploadTrackCommand.php @@ -22,13 +22,13 @@ namespace App\Commands; use App\Models\Track; use App\Models\User; -use Auth; +use Illuminate\Support\Facades\Auth; use Carbon\Carbon; -use Config; -use Gate; +use Illuminate\Support\Facades\Config; +use Illuminate\Support\Facades\Gate; use Illuminate\Foundation\Bus\DispatchesJobs; use Illuminate\Support\Facades\Request; -use Validator; +use Illuminate\Support\Facades\Validator; class UploadTrackCommand extends CommandBase { diff --git a/app/Console/Commands/ClassifyMLPMA.php b/app/Console/Commands/ClassifyMLPMA.php index 4a512b16..18822634 100644 --- a/app/Console/Commands/ClassifyMLPMA.php +++ b/app/Console/Commands/ClassifyMLPMA.php @@ -23,7 +23,7 @@ namespace App\Console\Commands; use App\Models\ShowSong; use App\Models\Track; use App\Models\TrackType; -use DB; +use Illuminate\Support\Facades\DB; use Illuminate\Console\Command; use Illuminate\Support\Str; diff --git a/app/Console/Commands/ClearTrackCache.php b/app/Console/Commands/ClearTrackCache.php index 765e8ff8..04e20add 100644 --- a/app/Console/Commands/ClearTrackCache.php +++ b/app/Console/Commands/ClearTrackCache.php @@ -22,7 +22,7 @@ namespace App\Console\Commands; use App\Models\TrackFile; use Carbon\Carbon; -use File; +use Illuminate\Support\Facades\File; use Illuminate\Console\Command; class ClearTrackCache extends Command diff --git a/app/Console/Commands/FixMLPMAImages.php b/app/Console/Commands/FixMLPMAImages.php index 4c346fe2..f27a2027 100644 --- a/app/Console/Commands/FixMLPMAImages.php +++ b/app/Console/Commands/FixMLPMAImages.php @@ -21,9 +21,9 @@ namespace App\Console\Commands; use App\Models\Image; -use Config; -use DB; -use File; +use Illuminate\Support\Facades\Config; +use Illuminate\Support\Facades\DB; +use Illuminate\Support\Facades\File; use getID3; use Illuminate\Console\Command; use Symfony\Component\HttpFoundation\File\UploadedFile; diff --git a/app/Console/Commands/ImportEQBeats.php b/app/Console/Commands/ImportEQBeats.php index ddc02a8b..813476e7 100644 --- a/app/Console/Commands/ImportEQBeats.php +++ b/app/Console/Commands/ImportEQBeats.php @@ -8,11 +8,11 @@ use App\Models\Genre; use App\Models\Image; use App\Models\Track; use App\Models\User; -use Auth; +use Illuminate\Support\Facades\Auth; use Carbon\Carbon; -use Config; -use DB; -use File; +use Illuminate\Support\Facades\Config; +use Illuminate\Support\Facades\DB; +use Illuminate\Support\Facades\File; use getID3; use Illuminate\Console\Command; use Illuminate\Support\Str; diff --git a/app/Console/Commands/MergeAccounts.php b/app/Console/Commands/MergeAccounts.php index 7af3fe4b..cc817b1c 100644 --- a/app/Console/Commands/MergeAccounts.php +++ b/app/Console/Commands/MergeAccounts.php @@ -33,7 +33,7 @@ use App\Models\ResourceUser; use App\Models\Track; use App\Models\User; use Carbon\Carbon; -use DB; +use Illuminate\Support\Facades\DB; use Illuminate\Console\Command; use Illuminate\Support\Collection; diff --git a/app/Console/Commands/MigrateOldData.php b/app/Console/Commands/MigrateOldData.php index 6060e241..d6909ce9 100644 --- a/app/Console/Commands/MigrateOldData.php +++ b/app/Console/Commands/MigrateOldData.php @@ -22,7 +22,7 @@ namespace App\Console\Commands; use App\Models\Image; use App\Models\ResourceLogItem; -use DB; +use Illuminate\Support\Facades\DB; use Exception; use Illuminate\Console\Command; use Symfony\Component\HttpFoundation\File\UploadedFile; diff --git a/app/Console/Commands/RebuildFilesizes.php b/app/Console/Commands/RebuildFilesizes.php index 16352bdc..511784d0 100644 --- a/app/Console/Commands/RebuildFilesizes.php +++ b/app/Console/Commands/RebuildFilesizes.php @@ -21,7 +21,7 @@ namespace App\Console\Commands; use App\Models\TrackFile; -use File; +use Illuminate\Support\Facades\File; use Illuminate\Console\Command; class RebuildFilesizes extends Command diff --git a/app/Console/Commands/RebuildTrackCache.php b/app/Console/Commands/RebuildTrackCache.php index af61ca1d..1def1c2b 100644 --- a/app/Console/Commands/RebuildTrackCache.php +++ b/app/Console/Commands/RebuildTrackCache.php @@ -23,7 +23,7 @@ namespace App\Console\Commands; use App\Jobs\EncodeTrackFile; use App\Models\Track; use App\Models\TrackFile; -use File; +use Illuminate\Support\Facades\File; use Illuminate\Console\Command; use Illuminate\Foundation\Bus\DispatchesJobs; diff --git a/app/Console/Commands/RefreshCache.php b/app/Console/Commands/RefreshCache.php index 289b342d..3c4584b7 100644 --- a/app/Console/Commands/RefreshCache.php +++ b/app/Console/Commands/RefreshCache.php @@ -21,7 +21,7 @@ namespace App\Console\Commands; use App\Models\ResourceLogItem; -use DB; +use Illuminate\Support\Facades\DB; use Illuminate\Console\Command; class RefreshCache extends Command diff --git a/app/Console/Commands/VersionFiles.php b/app/Console/Commands/VersionFiles.php index 66115e01..e1310765 100644 --- a/app/Console/Commands/VersionFiles.php +++ b/app/Console/Commands/VersionFiles.php @@ -21,7 +21,7 @@ namespace App\Console\Commands; use App\Models\TrackFile; -use File; +use Illuminate\Support\Facades\File; use Illuminate\Console\Command; class VersionFiles extends Command diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index 01b2a13a..3a2f9da3 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -20,9 +20,9 @@ namespace App\Http\Controllers; -use Config; -use Redirect; -use View; +use Illuminate\Support\Facades\Config; +use Illuminate\Support\Facades\Redirect; +use Illuminate\Support\Facades\View; class AccountController extends Controller { diff --git a/app/Http/Controllers/AdminController.php b/app/Http/Controllers/AdminController.php index c1073a8c..8b0df3ad 100644 --- a/app/Http/Controllers/AdminController.php +++ b/app/Http/Controllers/AdminController.php @@ -20,7 +20,7 @@ namespace App\Http\Controllers; -use View; +use Illuminate\Support\Facades\View; class AdminController extends Controller { diff --git a/app/Http/Controllers/AlbumsController.php b/app/Http/Controllers/AlbumsController.php index f70e4fca..640e31af 100644 --- a/app/Http/Controllers/AlbumsController.php +++ b/app/Http/Controllers/AlbumsController.php @@ -20,13 +20,13 @@ namespace App\Http\Controllers; -use App; +use Illuminate\Support\Facades\App; use App\AlbumDownloader; use App\Models\Album; use App\Models\ResourceLogItem; use App\Models\Track; -use Redirect; -use View; +use Illuminate\Support\Facades\Redirect; +use Illuminate\Support\Facades\View; class AlbumsController extends Controller { diff --git a/app/Http/Controllers/Api/Mobile/TracksController.php b/app/Http/Controllers/Api/Mobile/TracksController.php index 26288b2c..505325b6 100644 --- a/app/Http/Controllers/Api/Mobile/TracksController.php +++ b/app/Http/Controllers/Api/Mobile/TracksController.php @@ -22,7 +22,7 @@ namespace App\Http\Controllers\Api\Mobile; use App\Http\Controllers\Controller; use App\Models\Track; -use Response; +use Illuminate\Support\Facades\Response; class TracksController extends Controller { diff --git a/app/Http/Controllers/Api/V1/TracksController.php b/app/Http/Controllers/Api/V1/TracksController.php index 6021c2df..62c58138 100644 --- a/app/Http/Controllers/Api/V1/TracksController.php +++ b/app/Http/Controllers/Api/V1/TracksController.php @@ -24,7 +24,7 @@ use App\Commands\UploadTrackCommand; use App\Http\Controllers\ApiControllerBase; use App\Models\Image; use App\Models\Track; -use Response; +use Illuminate\Support\Facades\Response; class TracksController extends ApiControllerBase { diff --git a/app/Http/Controllers/Api/Web/AccountController.php b/app/Http/Controllers/Api/Web/AccountController.php index a6543dd8..a83c04c5 100644 --- a/app/Http/Controllers/Api/Web/AccountController.php +++ b/app/Http/Controllers/Api/Web/AccountController.php @@ -24,10 +24,10 @@ use App\Commands\SaveAccountSettingsCommand; use App\Http\Controllers\ApiControllerBase; use App\Models\Image; use App\Models\User; -use Auth; -use Gate; -use Request; -use Response; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Gate; +use Illuminate\Support\Facades\Request; +use Illuminate\Support\Facades\Response; class AccountController extends ApiControllerBase { diff --git a/app/Http/Controllers/Api/Web/AlbumsController.php b/app/Http/Controllers/Api/Web/AlbumsController.php index 110237fd..f52fff62 100644 --- a/app/Http/Controllers/Api/Web/AlbumsController.php +++ b/app/Http/Controllers/Api/Web/AlbumsController.php @@ -29,11 +29,11 @@ use App\Models\Image; use App\Models\ResourceLogItem; use App\Models\Track; use App\Models\User; -use Auth; -use Gate; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Gate; use Illuminate\Database\Eloquent\ModelNotFoundException; use Illuminate\Support\Facades\Request; -use Response; +use Illuminate\Support\Facades\Response; class AlbumsController extends ApiControllerBase { diff --git a/app/Http/Controllers/Api/Web/AnnouncementsController.php b/app/Http/Controllers/Api/Web/AnnouncementsController.php index 19ef69a6..15067b40 100644 --- a/app/Http/Controllers/Api/Web/AnnouncementsController.php +++ b/app/Http/Controllers/Api/Web/AnnouncementsController.php @@ -24,8 +24,8 @@ use App\Commands\CreateAnnouncementCommand; use App\Http\Controllers\Controller; use App\Models\Announcement; use Carbon\Carbon; -use Request; -use Response; +use Illuminate\Support\Facades\Request; +use Illuminate\Support\Facades\Response; class AnnouncementsController extends Controller { diff --git a/app/Http/Controllers/Api/Web/ArtistsController.php b/app/Http/Controllers/Api/Web/ArtistsController.php index 99bc32a7..3afba538 100644 --- a/app/Http/Controllers/Api/Web/ArtistsController.php +++ b/app/Http/Controllers/Api/Web/ArtistsController.php @@ -20,7 +20,7 @@ namespace App\Http\Controllers\Api\Web; -use App; +use Illuminate\Support\Facades\App; use App\Commands\CreateUserCommand; use App\Http\Controllers\ApiControllerBase; use App\Models\Album; @@ -31,10 +31,10 @@ use App\Models\Image; use App\Models\Track; use App\Models\User; use ColorThief\ColorThief; -use Gate; +use Illuminate\Support\Facades\Gate; use Helpers; use Illuminate\Support\Facades\Request; -use Response; +use Illuminate\Support\Facades\Response; class ArtistsController extends ApiControllerBase { diff --git a/app/Http/Controllers/Api/Web/CommentsController.php b/app/Http/Controllers/Api/Web/CommentsController.php index 5b75fe40..affdf976 100644 --- a/app/Http/Controllers/Api/Web/CommentsController.php +++ b/app/Http/Controllers/Api/Web/CommentsController.php @@ -20,12 +20,12 @@ namespace App\Http\Controllers\Api\Web; -use App; +use Illuminate\Support\Facades\App; use App\Commands\CreateCommentCommand; use App\Http\Controllers\ApiControllerBase; use App\Models\Comment; use Illuminate\Support\Facades\Request; -use Response; +use Illuminate\Support\Facades\Response; class CommentsController extends ApiControllerBase { diff --git a/app/Http/Controllers/Api/Web/DashboardController.php b/app/Http/Controllers/Api/Web/DashboardController.php index 5096d931..83d60030 100644 --- a/app/Http/Controllers/Api/Web/DashboardController.php +++ b/app/Http/Controllers/Api/Web/DashboardController.php @@ -22,8 +22,8 @@ namespace App\Http\Controllers\Api\Web; use App\Http\Controllers\ApiControllerBase; use App\Models\Track; -use Auth; -use Response; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Response; class DashboardController extends ApiControllerBase { diff --git a/app/Http/Controllers/Api/Web/FavouritesController.php b/app/Http/Controllers/Api/Web/FavouritesController.php index 965ba6be..6adb78e4 100644 --- a/app/Http/Controllers/Api/Web/FavouritesController.php +++ b/app/Http/Controllers/Api/Web/FavouritesController.php @@ -26,9 +26,9 @@ use App\Models\Album; use App\Models\Favourite; use App\Models\Playlist; use App\Models\Track; -use Auth; +use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Request; -use Response; +use Illuminate\Support\Facades\Response; class FavouritesController extends ApiControllerBase { diff --git a/app/Http/Controllers/Api/Web/GenresController.php b/app/Http/Controllers/Api/Web/GenresController.php index 754e38df..adbcd836 100644 --- a/app/Http/Controllers/Api/Web/GenresController.php +++ b/app/Http/Controllers/Api/Web/GenresController.php @@ -26,7 +26,7 @@ use App\Commands\RenameGenreCommand; use App\Http\Controllers\ApiControllerBase; use App\Models\Genre; use Illuminate\Support\Facades\Request; -use Response; +use Illuminate\Support\Facades\Response; class GenresController extends ApiControllerBase { diff --git a/app/Http/Controllers/Api/Web/ImagesController.php b/app/Http/Controllers/Api/Web/ImagesController.php index 5cf1fd2c..5f6e32d2 100644 --- a/app/Http/Controllers/Api/Web/ImagesController.php +++ b/app/Http/Controllers/Api/Web/ImagesController.php @@ -23,8 +23,8 @@ namespace App\Http\Controllers\Api\Web; use App\Http\Controllers\ApiControllerBase; use App\Models\Image; use App\Models\User; -use Auth; -use Response; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Response; class ImagesController extends ApiControllerBase { diff --git a/app/Http/Controllers/Api/Web/NotificationsController.php b/app/Http/Controllers/Api/Web/NotificationsController.php index dc310525..f8e93f16 100644 --- a/app/Http/Controllers/Api/Web/NotificationsController.php +++ b/app/Http/Controllers/Api/Web/NotificationsController.php @@ -25,7 +25,7 @@ use App\Models\Notification; use App\Models\Subscription; use App\Models\Track; use App\Models\User; -use Auth; +use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Request; use Minishlink\WebPush\WebPush; diff --git a/app/Http/Controllers/Api/Web/PlaylistsController.php b/app/Http/Controllers/Api/Web/PlaylistsController.php index 0c1baed5..0edbfc31 100644 --- a/app/Http/Controllers/Api/Web/PlaylistsController.php +++ b/app/Http/Controllers/Api/Web/PlaylistsController.php @@ -31,10 +31,10 @@ use App\Models\Playlist; use App\Models\ResourceLogItem; use App\Models\Track; use App\Models\User; -use Auth; +use Illuminate\Support\Facades\Auth; use Illuminate\Database\Eloquent\ModelNotFoundException; use Illuminate\Support\Facades\Request; -use Response; +use Illuminate\Support\Facades\Response; class PlaylistsController extends ApiControllerBase { diff --git a/app/Http/Controllers/Api/Web/SearchController.php b/app/Http/Controllers/Api/Web/SearchController.php index 99ef341b..b04a832b 100644 --- a/app/Http/Controllers/Api/Web/SearchController.php +++ b/app/Http/Controllers/Api/Web/SearchController.php @@ -24,7 +24,7 @@ use App\Http\Controllers\ApiControllerBase; use App\Library\Search; use Elasticsearch; use Illuminate\Support\Facades\Request; -use Response; +use Illuminate\Support\Facades\Response; class SearchController extends ApiControllerBase { diff --git a/app/Http/Controllers/Api/Web/ShowSongsController.php b/app/Http/Controllers/Api/Web/ShowSongsController.php index f7cfd3ee..3f8a8398 100644 --- a/app/Http/Controllers/Api/Web/ShowSongsController.php +++ b/app/Http/Controllers/Api/Web/ShowSongsController.php @@ -26,7 +26,7 @@ use App\Commands\RenameShowSongCommand; use App\Http\Controllers\ApiControllerBase; use App\Models\ShowSong; use Illuminate\Support\Facades\Request; -use Response; +use Illuminate\Support\Facades\Response; class ShowSongsController extends ApiControllerBase { diff --git a/app/Http/Controllers/Api/Web/StatsController.php b/app/Http/Controllers/Api/Web/StatsController.php index 1f6b1c2a..cc205ef5 100644 --- a/app/Http/Controllers/Api/Web/StatsController.php +++ b/app/Http/Controllers/Api/Web/StatsController.php @@ -23,13 +23,13 @@ namespace App\Http\Controllers\Api\Web; use App\Http\Controllers\ApiControllerBase; use App\Models\ResourceLogItem; use App\Models\Track; -use Auth; -use Cache; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Cache; use Carbon\Carbon; -use DB; +use Illuminate\Support\Facades\DB; use Illuminate\Database\Eloquent\ModelNotFoundException; use Illuminate\Support\Str; -use Response; +use Illuminate\Support\Facades\Response; class StatsController extends ApiControllerBase { diff --git a/app/Http/Controllers/Api/Web/TaxonomiesController.php b/app/Http/Controllers/Api/Web/TaxonomiesController.php index b917c8c9..33148f51 100644 --- a/app/Http/Controllers/Api/Web/TaxonomiesController.php +++ b/app/Http/Controllers/Api/Web/TaxonomiesController.php @@ -25,7 +25,7 @@ use App\Models\Genre; use App\Models\License; use App\Models\ShowSong; use App\Models\TrackType; -use DB; +use Illuminate\Support\Facades\DB; class TaxonomiesController extends ApiControllerBase { diff --git a/app/Http/Controllers/Api/Web/TracksController.php b/app/Http/Controllers/Api/Web/TracksController.php index 485b72ff..6a2d5485 100644 --- a/app/Http/Controllers/Api/Web/TracksController.php +++ b/app/Http/Controllers/Api/Web/TracksController.php @@ -32,11 +32,11 @@ use App\Models\Track; use App\Models\TrackFile; use App\Models\TrackType; use App\Models\User; -use Auth; -use File; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\File; use Illuminate\Database\Eloquent\ModelNotFoundException; use Illuminate\Support\Facades\Request; -use Response; +use Illuminate\Support\Facades\Response; use Symfony\Component\HttpFoundation\File\UploadedFile; class TracksController extends ApiControllerBase diff --git a/app/Http/Controllers/ApiControllerBase.php b/app/Http/Controllers/ApiControllerBase.php index 8a97a9d0..78be2077 100644 --- a/app/Http/Controllers/ApiControllerBase.php +++ b/app/Http/Controllers/ApiControllerBase.php @@ -21,7 +21,7 @@ namespace App\Http\Controllers; use App\Commands\CommandBase; -use Response; +use Illuminate\Support\Facades\Response; abstract class ApiControllerBase extends Controller { diff --git a/app/Http/Controllers/ArtistsController.php b/app/Http/Controllers/ArtistsController.php index 2e6aa64d..7ee7d574 100644 --- a/app/Http/Controllers/ArtistsController.php +++ b/app/Http/Controllers/ArtistsController.php @@ -20,10 +20,10 @@ namespace App\Http\Controllers; -use App; +use Illuminate\Support\Facades\App; use App\Models\User; -use Redirect; -use View; +use Illuminate\Support\Facades\Redirect; +use Illuminate\Support\Facades\View; class ArtistsController extends Controller { diff --git a/app/Http/Controllers/AuthController.php b/app/Http/Controllers/AuthController.php index 310c89e9..4a88b9eb 100644 --- a/app/Http/Controllers/AuthController.php +++ b/app/Http/Controllers/AuthController.php @@ -22,15 +22,15 @@ namespace App\Http\Controllers; use App\Models\Activity; use App\Models\User; -use Auth; +use Illuminate\Support\Facades\Auth; use Carbon\Carbon; -use DB; +use Illuminate\Support\Facades\DB; use League\OAuth2\Client\Provider\Exception\IdentityProviderException; use League\OAuth2\Client\Token\AccessToken; -use Log; +use Illuminate\Support\Facades\Log; use Poniverse\Lib\Client; -use Redirect; -use Request; +use Illuminate\Support\Facades\Redirect; +use Illuminate\Support\Facades\Request; class AuthController extends Controller { diff --git a/app/Http/Controllers/ContentController.php b/app/Http/Controllers/ContentController.php index 7f251d3d..c9b72fef 100644 --- a/app/Http/Controllers/ContentController.php +++ b/app/Http/Controllers/ContentController.php @@ -20,7 +20,7 @@ namespace App\Http\Controllers; -use View; +use Illuminate\Support\Facades\View; class ContentController extends Controller { diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 170b76d1..defda27b 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -20,7 +20,7 @@ namespace App\Http\Controllers; -use View; +use Illuminate\Support\Facades\View; class HomeController extends Controller { diff --git a/app/Http/Controllers/ImagesController.php b/app/Http/Controllers/ImagesController.php index e9a6aba9..b296a2dc 100644 --- a/app/Http/Controllers/ImagesController.php +++ b/app/Http/Controllers/ImagesController.php @@ -20,11 +20,11 @@ namespace App\Http\Controllers; -use App; +use Illuminate\Support\Facades\App; use App\Models\Image; -use Config; -use Redirect; -use Response; +use Illuminate\Support\Facades\Config; +use Illuminate\Support\Facades\Redirect; +use Illuminate\Support\Facades\Response; class ImagesController extends Controller { diff --git a/app/Http/Controllers/NotificationsController.php b/app/Http/Controllers/NotificationsController.php index 19081f73..7f75b44e 100644 --- a/app/Http/Controllers/NotificationsController.php +++ b/app/Http/Controllers/NotificationsController.php @@ -20,12 +20,12 @@ namespace App\Http\Controllers; -use App; +use Illuminate\Support\Facades\App; use App\Models\Email; use App\Models\EmailSubscription; -use Auth; -use DB; -use View; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\DB; +use Illuminate\Support\Facades\View; class NotificationsController extends Controller { diff --git a/app/Http/Controllers/PlaylistsController.php b/app/Http/Controllers/PlaylistsController.php index 5c87f28c..9d9cb827 100644 --- a/app/Http/Controllers/PlaylistsController.php +++ b/app/Http/Controllers/PlaylistsController.php @@ -20,14 +20,14 @@ namespace App\Http\Controllers; -use App; +use Illuminate\Support\Facades\App; use App\Models\Playlist; use App\Models\ResourceLogItem; use App\Models\Track; use App\PlaylistDownloader; -use Auth; -use Redirect; -use View; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Redirect; +use Illuminate\Support\Facades\View; class PlaylistsController extends Controller { diff --git a/app/Http/Controllers/StatsController.php b/app/Http/Controllers/StatsController.php index 897cc1d0..4e14ad6e 100644 --- a/app/Http/Controllers/StatsController.php +++ b/app/Http/Controllers/StatsController.php @@ -20,7 +20,7 @@ namespace App\Http\Controllers; -use View; +use Illuminate\Support\Facades\View; class StatsController extends Controller { diff --git a/app/Http/Controllers/TracksController.php b/app/Http/Controllers/TracksController.php index 3db49e83..400be688 100644 --- a/app/Http/Controllers/TracksController.php +++ b/app/Http/Controllers/TracksController.php @@ -20,16 +20,16 @@ namespace App\Http\Controllers; -use App; +use Illuminate\Support\Facades\App; use App\Models\ResourceLogItem; use App\Models\Track; use App\Models\TrackFile; -use Auth; -use Config; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Config; use Illuminate\Http\Request; -use Redirect; -use Response; -use View; +use Illuminate\Support\Facades\Redirect; +use Illuminate\Support\Facades\Response; +use Illuminate\Support\Facades\View; class TracksController extends Controller { diff --git a/app/Http/Controllers/UploaderController.php b/app/Http/Controllers/UploaderController.php index 3a5e1943..b15e1910 100644 --- a/app/Http/Controllers/UploaderController.php +++ b/app/Http/Controllers/UploaderController.php @@ -20,7 +20,7 @@ namespace App\Http\Controllers; -use View; +use Illuminate\Support\Facades\View; class UploaderController extends Controller { diff --git a/app/Http/Middleware/Authorize.php b/app/Http/Middleware/Authorize.php index bd899510..acac95b2 100644 --- a/app/Http/Middleware/Authorize.php +++ b/app/Http/Middleware/Authorize.php @@ -21,7 +21,7 @@ namespace App\Http\Middleware; use Closure; -use Gate; +use Illuminate\Support\Facades\Gate; use Illuminate\Contracts\Auth\Guard; class Authorize diff --git a/app/Http/Middleware/DisabledAccountCheck.php b/app/Http/Middleware/DisabledAccountCheck.php index c6703a99..a9998bca 100644 --- a/app/Http/Middleware/DisabledAccountCheck.php +++ b/app/Http/Middleware/DisabledAccountCheck.php @@ -22,7 +22,7 @@ namespace App\Http\Middleware; use Closure; use Illuminate\Contracts\Auth\Guard; -use Log; +use Illuminate\Support\Facades\Log; class DisabledAccountCheck { diff --git a/app/Jobs/DeleteGenre.php b/app/Jobs/DeleteGenre.php index 646cda53..1a1cc1c9 100644 --- a/app/Jobs/DeleteGenre.php +++ b/app/Jobs/DeleteGenre.php @@ -22,8 +22,8 @@ namespace App\Jobs; use App\Models\Genre; use App\Models\Track; -use Auth; -use DB; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\DB; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Queue\InteractsWithQueue; use SerializesModels; diff --git a/app/Jobs/DeleteShowSong.php b/app/Jobs/DeleteShowSong.php index 35fc68f4..4a4e9dba 100644 --- a/app/Jobs/DeleteShowSong.php +++ b/app/Jobs/DeleteShowSong.php @@ -22,8 +22,8 @@ namespace App\Jobs; use App\Models\ShowSong; use App\Models\Track; -use Auth; -use DB; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\DB; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Queue\InteractsWithQueue; use SerializesModels; diff --git a/app/Jobs/EncodeTrackFile.php b/app/Jobs/EncodeTrackFile.php index 3b2b5cb6..a7373f39 100644 --- a/app/Jobs/EncodeTrackFile.php +++ b/app/Jobs/EncodeTrackFile.php @@ -25,13 +25,13 @@ use App\Exceptions\InvalidEncodeOptionsException; use App\Models\Track; use App\Models\TrackFile; use Carbon\Carbon; -use Config; -use DB; -use File; +use Illuminate\Support\Facades\Config; +use Illuminate\Support\Facades\DB; +use Illuminate\Support\Facades\File; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; -use Log; +use Illuminate\Support\Facades\Log; use Symfony\Component\Process\Exception\ProcessFailedException; use Symfony\Component\Process\Process; diff --git a/app/Jobs/Job.php b/app/Jobs/Job.php index 62378f68..c18630f0 100644 --- a/app/Jobs/Job.php +++ b/app/Jobs/Job.php @@ -20,8 +20,8 @@ namespace App\Jobs; -use App; -use DB; +use Illuminate\Support\Facades\App; +use Illuminate\Support\Facades\DB; use Illuminate\Bus\Queueable; abstract class Job diff --git a/app/Jobs/UpdateSearchIndexForEntity.php b/app/Jobs/UpdateSearchIndexForEntity.php index d5bc2e82..d4941b01 100644 --- a/app/Jobs/UpdateSearchIndexForEntity.php +++ b/app/Jobs/UpdateSearchIndexForEntity.php @@ -22,7 +22,7 @@ namespace App\Jobs; use App\Contracts\Searchable; use App\Jobs\Job; -use DB; +use Illuminate\Support\Facades\DB; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Database\Eloquent\Model; use Illuminate\Queue\InteractsWithQueue; diff --git a/app/Jobs/UpdateTagsForRenamedGenre.php b/app/Jobs/UpdateTagsForRenamedGenre.php index e9623856..a55e9531 100644 --- a/app/Jobs/UpdateTagsForRenamedGenre.php +++ b/app/Jobs/UpdateTagsForRenamedGenre.php @@ -22,12 +22,12 @@ namespace App\Jobs; use App\Models\Genre; use App\Models\Track; -use Auth; -use Cache; -use DB; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Cache; +use Illuminate\Support\Facades\DB; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Queue\InteractsWithQueue; -use Log; +use Illuminate\Support\Facades\Log; use SerializesModels; /** diff --git a/app/Jobs/UpdateTagsForRenamedShowSong.php b/app/Jobs/UpdateTagsForRenamedShowSong.php index 42e90c36..bac387d2 100644 --- a/app/Jobs/UpdateTagsForRenamedShowSong.php +++ b/app/Jobs/UpdateTagsForRenamedShowSong.php @@ -22,11 +22,11 @@ namespace App\Jobs; use App\Models\ShowSong; use App\Models\Track; -use Auth; -use Cache; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Cache; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Queue\InteractsWithQueue; -use Log; +use Illuminate\Support\Facades\Log; use SerializesModels; /** diff --git a/app/Library/Notifications/Drivers/NativeDriver.php b/app/Library/Notifications/Drivers/NativeDriver.php index 5920ed13..9c2f32c4 100644 --- a/app/Library/Notifications/Drivers/NativeDriver.php +++ b/app/Library/Notifications/Drivers/NativeDriver.php @@ -26,7 +26,7 @@ use App\Models\Comment; use App\Models\Playlist; use App\Models\Track; use App\Models\User; -use Config; +use Illuminate\Support\Facades\Config; use Minishlink\WebPush\WebPush; class NativeDriver extends AbstractDriver diff --git a/app/Library/Notifications/Drivers/PonyfmDriver.php b/app/Library/Notifications/Drivers/PonyfmDriver.php index faa9651c..e12a5605 100644 --- a/app/Library/Notifications/Drivers/PonyfmDriver.php +++ b/app/Library/Notifications/Drivers/PonyfmDriver.php @@ -30,8 +30,8 @@ use App\Models\Playlist; use App\Models\Track; use App\Models\User; use Carbon\Carbon; -use Log; -use Mail; +use Illuminate\Support\Facades\Log; +use Illuminate\Support\Facades\Mail; class PonyfmDriver extends AbstractDriver { diff --git a/app/Library/Search.php b/app/Library/Search.php index bb146367..c5110d45 100644 --- a/app/Library/Search.php +++ b/app/Library/Search.php @@ -24,7 +24,7 @@ use App\Models\Album; use App\Models\Playlist; use App\Models\Track; use App\Models\User; -use DB; +use Illuminate\Support\Facades\DB; use Elasticsearch\Client; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Collection; diff --git a/app/Models/Album.php b/app/Models/Album.php index b8b0b8a6..1a4a7a15 100644 --- a/app/Models/Album.php +++ b/app/Models/Album.php @@ -27,11 +27,11 @@ use App\Exceptions\TrackFileNotFoundException; use App\Traits\IndexedInElasticsearchTrait; use App\Traits\SlugTrait; use App\Traits\TrackCollection; -use Auth; -use Cache; -use DB; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Cache; +use Illuminate\Support\Facades\DB; use Exception; -use Gate; +use Illuminate\Support\Facades\Gate; use Helpers; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; diff --git a/app/Models/Comment.php b/app/Models/Comment.php index 632b3612..90a4f6a6 100644 --- a/app/Models/Comment.php +++ b/app/Models/Comment.php @@ -21,7 +21,7 @@ namespace App\Models; use App\Contracts\Commentable; -use DB; +use Illuminate\Support\Facades\DB; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\MorphMany; use Illuminate\Database\Eloquent\SoftDeletes; diff --git a/app/Models/Genre.php b/app/Models/Genre.php index 291c56e2..ca805b28 100644 --- a/app/Models/Genre.php +++ b/app/Models/Genre.php @@ -21,7 +21,7 @@ namespace App\Models; use App\Traits\SlugTrait; -use DB; +use Illuminate\Support\Facades\DB; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\Relation; diff --git a/app/Models/Image.php b/app/Models/Image.php index d8c0de3f..1a3336c3 100644 --- a/app/Models/Image.php +++ b/app/Models/Image.php @@ -20,7 +20,7 @@ namespace App\Models; -use Config; +use Illuminate\Support\Facades\Config; use External; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Log; diff --git a/app/Models/Playlist.php b/app/Models/Playlist.php index 7f0ba299..d57be12a 100644 --- a/app/Models/Playlist.php +++ b/app/Models/Playlist.php @@ -27,9 +27,9 @@ use App\Exceptions\TrackFileNotFoundException; use App\Traits\IndexedInElasticsearchTrait; use App\Traits\SlugTrait; use App\Traits\TrackCollection; -use Auth; -use Cache; -use DB; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Cache; +use Illuminate\Support\Facades\DB; use Helpers; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\HasMany; diff --git a/app/Models/ResourceLogItem.php b/app/Models/ResourceLogItem.php index 40f16e49..de4e1541 100644 --- a/app/Models/ResourceLogItem.php +++ b/app/Models/ResourceLogItem.php @@ -20,11 +20,11 @@ namespace App\Models; -use Auth; +use Illuminate\Support\Facades\Auth; use Carbon\Carbon; -use DB; +use Illuminate\Support\Facades\DB; use Illuminate\Database\Eloquent\Model; -use Request; +use Illuminate\Support\Facades\Request; /** * App\Models\ResourceLogItem. diff --git a/app/Models/ShowSong.php b/app/Models/ShowSong.php index b277347e..2dd7c171 100644 --- a/app/Models/ShowSong.php +++ b/app/Models/ShowSong.php @@ -20,7 +20,7 @@ namespace App\Models; -use DB; +use Illuminate\Support\Facades\DB; use Illuminate\Database\Eloquent\Model; /** diff --git a/app/Models/Track.php b/app/Models/Track.php index c4729972..47ff0522 100644 --- a/app/Models/Track.php +++ b/app/Models/Track.php @@ -27,13 +27,13 @@ use App\Exceptions\TrackFileNotFoundException; use App\Models\ResourceLogItem; use App\Traits\IndexedInElasticsearchTrait; use App\Traits\SlugTrait; -use Auth; -use Cache; -use Config; -use DB; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Cache; +use Illuminate\Support\Facades\Config; +use Illuminate\Support\Facades\DB; use Exception; use External; -use Gate; +use Illuminate\Support\Facades\Gate; use getid3_writetags; use Helpers; use Illuminate\Database\Eloquent\Factories\HasFactory; @@ -42,7 +42,7 @@ use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\MorphMany; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Support\Str; -use Log; +use Illuminate\Support\Facades\Log; use Venturecraft\Revisionable\RevisionableTrait; /** diff --git a/app/Models/TrackFile.php b/app/Models/TrackFile.php index a5a3f425..566e33cc 100644 --- a/app/Models/TrackFile.php +++ b/app/Models/TrackFile.php @@ -20,9 +20,9 @@ namespace App\Models; -use App; -use Config; -use File; +use Illuminate\Support\Facades\App; +use Illuminate\Support\Facades\Config; +use Illuminate\Support\Facades\File; use Helpers; use Illuminate\Database\Eloquent\Model; diff --git a/app/Models/User.php b/app/Models/User.php index b4511177..091d7ee3 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -23,9 +23,9 @@ namespace App\Models; use App\Contracts\Commentable; use App\Contracts\Searchable; use App\Traits\IndexedInElasticsearchTrait; -use Auth; +use Illuminate\Support\Facades\Auth; use Carbon\Carbon; -use DB; +use Illuminate\Support\Facades\DB; use Gravatar; use Illuminate\Auth\Authenticatable; use Illuminate\Auth\Passwords\CanResetPassword; @@ -38,7 +38,7 @@ use Illuminate\Database\Eloquent\Relations\MorphMany; use Illuminate\Foundation\Auth\Access\Authorizable; use Illuminate\Support\Str; use League\OAuth2\Client\Token\AccessToken; -use Validator; +use Illuminate\Support\Facades\Validator; use Venturecraft\Revisionable\RevisionableTrait; /** diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 0dcb6bc2..e51c9719 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -25,7 +25,7 @@ use Illuminate\Foundation\Application; use Illuminate\Support\ServiceProvider; use PfmValidator; use Poniverse; -use Validator; +use Illuminate\Support\Facades\Validator; class AppServiceProvider extends ServiceProvider { diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 6517847e..fbb1fb09 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -30,7 +30,7 @@ use App\Policies\GenrePolicy; use App\Policies\ShowSongPolicy; use App\Policies\TrackPolicy; use App\Policies\UserPolicy; -use Gate; +use Illuminate\Support\Facades\Gate; use Illuminate\Contracts\Auth\Access\Gate as GateContract; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; diff --git a/app/Traits/IndexedInElasticsearchTrait.php b/app/Traits/IndexedInElasticsearchTrait.php index 38a932dc..39f75e03 100644 --- a/app/Traits/IndexedInElasticsearchTrait.php +++ b/app/Traits/IndexedInElasticsearchTrait.php @@ -22,7 +22,7 @@ namespace App\Traits; use App\Contracts\Searchable; use App\Jobs\UpdateSearchIndexForEntity; -use Config; +use Illuminate\Support\Facades\Config; use Elasticsearch; use Elasticsearch\Common\Exceptions\Missing404Exception; use Illuminate\Foundation\Bus\DispatchesJobs; diff --git a/app/Traits/TrackCollection.php b/app/Traits/TrackCollection.php index b81a6f42..cb312510 100644 --- a/app/Traits/TrackCollection.php +++ b/app/Traits/TrackCollection.php @@ -24,7 +24,7 @@ namespace App\Traits; use App\Jobs\EncodeTrackFile; use App\Models\Track; use App\Models\TrackFile; -use File; +use Illuminate\Support\Facades\File; use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\Relation; From 8225ff5b920976b9b35bbc5bfbc437039383ea2c Mon Sep 17 00:00:00 2001 From: Laravel Shift Date: Sun, 14 Feb 2021 19:45:51 +0000 Subject: [PATCH 03/12] Streamline Blade directives Laravel offers many built-in Blade directives, including: `@auth`, `@guest` ,`@csrf`, `@method`, `@json`, and more. Review the [Blade][1] documentation for more details. [1]: https://laravel.com/docs/5.7/blade --- resources/views/shared/_app_layout.blade.php | 16 ++++++++-------- resources/views/tracks/embed.blade.php | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/resources/views/shared/_app_layout.blade.php b/resources/views/shared/_app_layout.blade.php index 7c503448..2b54fac7 100644 --- a/resources/views/shared/_app_layout.blade.php +++ b/resources/views/shared/_app_layout.blade.php @@ -53,7 +53,7 @@
- @if (Auth::check()) + @auth - @endif + @endauth
@@ -90,7 +90,7 @@
  • About / FAQ
  • Forum
  • - @if (Auth::check()) + @auth
  • Upload Music
  • @@ -114,7 +114,7 @@ @else
  • Login
  • Register
  • - @endif + @endauth
  • @if(config('ponyfm.use_powered_by_footer')) @@ -133,13 +133,13 @@ @yield('app_content') - @if (Auth::check()) + @auth
    - @endif + @endauth @endsection @@ -154,12 +154,12 @@