From c32b315cd7d2d302e7f55706f8e69c99d736c66b Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Sun, 26 Sep 2021 15:37:55 +0100 Subject: [PATCH] Standardised facade usage to use via their FQCN Done via Laravel Shift Workbench --- app/Actions/TagRepo.php | 2 +- app/Auth/UserRepo.php | 2 +- app/Console/Commands/RegenerateSearch.php | 2 +- app/Http/Controllers/Auth/RegisterController.php | 2 +- app/Providers/AppServiceProvider.php | 6 +++--- app/Providers/AuthServiceProvider.php | 2 +- app/Providers/RouteServiceProvider.php | 2 +- app/Uploads/AttachmentService.php | 2 +- app/Uploads/ImageService.php | 2 +- tests/Auth/AuthTest.php | 2 +- tests/Auth/SocialAuthTest.php | 2 +- tests/Auth/UserInviteTest.php | 4 ++-- tests/PublicActionTest.php | 2 +- tests/RecycleBinTest.php | 2 +- tests/ThemeTest.php | 2 +- 15 files changed, 18 insertions(+), 18 deletions(-) diff --git a/app/Actions/TagRepo.php b/app/Actions/TagRepo.php index ca65b78e8..90d657e51 100644 --- a/app/Actions/TagRepo.php +++ b/app/Actions/TagRepo.php @@ -4,7 +4,7 @@ namespace BookStack\Actions; use BookStack\Auth\Permissions\PermissionService; use BookStack\Entities\Models\Entity; -use DB; +use Illuminate\Support\Facades\DB; use Illuminate\Support\Collection; class TagRepo diff --git a/app/Auth/UserRepo.php b/app/Auth/UserRepo.php index e1a040fc2..6d48f1240 100644 --- a/app/Auth/UserRepo.php +++ b/app/Auth/UserRepo.php @@ -15,7 +15,7 @@ use Exception; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Collection; use Illuminate\Pagination\LengthAwarePaginator; -use Log; +use Illuminate\Support\Facades\Log; class UserRepo { diff --git a/app/Console/Commands/RegenerateSearch.php b/app/Console/Commands/RegenerateSearch.php index 3dc3ec0af..a285f6d72 100644 --- a/app/Console/Commands/RegenerateSearch.php +++ b/app/Console/Commands/RegenerateSearch.php @@ -3,7 +3,7 @@ namespace BookStack\Console\Commands; use BookStack\Entities\Tools\SearchIndex; -use DB; +use Illuminate\Support\Facades\DB; use Illuminate\Console\Command; class RegenerateSearch extends Command diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index bd1ffeac2..209827d6d 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -12,7 +12,7 @@ use BookStack\Http\Controllers\Controller; use Illuminate\Foundation\Auth\RegistersUsers; use Illuminate\Http\Request; use Illuminate\Support\Facades\Hash; -use Validator; +use Illuminate\Support\Facades\Validator; class RegisterController extends Controller { diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 59704f4a1..b016df563 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -2,7 +2,7 @@ namespace BookStack\Providers; -use Blade; +use Illuminate\Support\Facades\Blade; use BookStack\Auth\Access\LoginService; use BookStack\Auth\Access\SocialAuthService; use BookStack\Entities\BreadcrumbsViewComposer; @@ -18,8 +18,8 @@ use Illuminate\Database\Eloquent\Relations\Relation; use Illuminate\Support\Facades\View; use Illuminate\Support\ServiceProvider; use Laravel\Socialite\Contracts\Factory as SocialiteFactory; -use Schema; -use URL; +use Illuminate\Support\Facades\Schema; +use Illuminate\Support\Facades\URL; class AppServiceProvider extends ServiceProvider { diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 71b7ab016..0d9dca7a1 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -2,7 +2,7 @@ namespace BookStack\Providers; -use Auth; +use Illuminate\Support\Facades\Auth; use BookStack\Api\ApiTokenGuard; use BookStack\Auth\Access\ExternalBaseUserProvider; use BookStack\Auth\Access\Guards\LdapSessionGuard; diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 8f0dab400..b60443a45 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -3,7 +3,7 @@ namespace BookStack\Providers; use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; -use Route; +use Illuminate\Support\Facades\Route; class RouteServiceProvider extends ServiceProvider { diff --git a/app/Uploads/AttachmentService.php b/app/Uploads/AttachmentService.php index 298d53a04..5ba627040 100644 --- a/app/Uploads/AttachmentService.php +++ b/app/Uploads/AttachmentService.php @@ -8,7 +8,7 @@ use Illuminate\Contracts\Filesystem\Factory as FileSystem; use Illuminate\Contracts\Filesystem\FileNotFoundException; use Illuminate\Contracts\Filesystem\Filesystem as FileSystemInstance; use Illuminate\Support\Str; -use Log; +use Illuminate\Support\Facades\Log; use Symfony\Component\HttpFoundation\File\UploadedFile; class AttachmentService diff --git a/app/Uploads/ImageService.php b/app/Uploads/ImageService.php index 51ddf9bdc..13d17f697 100644 --- a/app/Uploads/ImageService.php +++ b/app/Uploads/ImageService.php @@ -3,7 +3,7 @@ namespace BookStack\Uploads; use BookStack\Exceptions\ImageUploadException; -use DB; +use Illuminate\Support\Facades\DB; use ErrorException; use Exception; use Illuminate\Contracts\Cache\Repository as Cache; diff --git a/tests/Auth/AuthTest.php b/tests/Auth/AuthTest.php index a718b14b6..d037b5701 100644 --- a/tests/Auth/AuthTest.php +++ b/tests/Auth/AuthTest.php @@ -7,7 +7,7 @@ use BookStack\Auth\User; use BookStack\Entities\Models\Page; use BookStack\Notifications\ConfirmEmail; use BookStack\Notifications\ResetPassword; -use DB; +use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Notification; use Tests\TestCase; use Tests\TestResponse; diff --git a/tests/Auth/SocialAuthTest.php b/tests/Auth/SocialAuthTest.php index 44b9e4ce1..f70263dd2 100644 --- a/tests/Auth/SocialAuthTest.php +++ b/tests/Auth/SocialAuthTest.php @@ -5,7 +5,7 @@ namespace Tests\Auth; use BookStack\Actions\ActivityType; use BookStack\Auth\SocialAccount; use BookStack\Auth\User; -use DB; +use Illuminate\Support\Facades\DB; use Laravel\Socialite\Contracts\Factory; use Laravel\Socialite\Contracts\Provider; use Mockery; diff --git a/tests/Auth/UserInviteTest.php b/tests/Auth/UserInviteTest.php index c5c4b01af..d994dd5b9 100644 --- a/tests/Auth/UserInviteTest.php +++ b/tests/Auth/UserInviteTest.php @@ -6,9 +6,9 @@ use BookStack\Auth\Access\UserInviteService; use BookStack\Auth\User; use BookStack\Notifications\UserInvite; use Carbon\Carbon; -use DB; +use Illuminate\Support\Facades\DB; use Illuminate\Support\Str; -use Notification; +use Illuminate\Support\Facades\Notification; use Tests\TestCase; class UserInviteTest extends TestCase diff --git a/tests/PublicActionTest.php b/tests/PublicActionTest.php index ae0c0ff95..953a7dde0 100644 --- a/tests/PublicActionTest.php +++ b/tests/PublicActionTest.php @@ -2,7 +2,7 @@ namespace Tests; -use Auth; +use Illuminate\Support\Facades\Auth; use BookStack\Auth\Permissions\PermissionService; use BookStack\Auth\Permissions\RolePermission; use BookStack\Auth\Role; diff --git a/tests/RecycleBinTest.php b/tests/RecycleBinTest.php index 1c5445212..dbdc6daf6 100644 --- a/tests/RecycleBinTest.php +++ b/tests/RecycleBinTest.php @@ -8,7 +8,7 @@ use BookStack\Entities\Models\Chapter; use BookStack\Entities\Models\Deletion; use BookStack\Entities\Models\Entity; use BookStack\Entities\Models\Page; -use DB; +use Illuminate\Support\Facades\DB; use Illuminate\Support\Carbon; class RecycleBinTest extends TestCase diff --git a/tests/ThemeTest.php b/tests/ThemeTest.php index bab85be7a..2d08fdb4a 100644 --- a/tests/ThemeTest.php +++ b/tests/ThemeTest.php @@ -7,7 +7,7 @@ use BookStack\Entities\Models\Page; use BookStack\Entities\Tools\PageContent; use BookStack\Facades\Theme; use BookStack\Theming\ThemeEvents; -use File; +use Illuminate\Support\Facades\File; use Illuminate\Http\Request; use Illuminate\Http\Response; use League\CommonMark\ConfigurableEnvironmentInterface;