Skip to content

Commit

Permalink
#309 - Replace Facade alias class names with Facade FQCN
Browse files Browse the repository at this point in the history
  • Loading branch information
stevanpavlovic authored and ifox committed Jul 22, 2019
1 parent d7d7005 commit d80ef94
Show file tree
Hide file tree
Showing 41 changed files with 51 additions and 42 deletions.
1 change: 1 addition & 0 deletions migrations/create_files_tables.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateFilesTables extends Migration
{
Expand Down
1 change: 1 addition & 0 deletions migrations/create_medias_tables.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateMediasTables extends Migration
{
Expand Down
1 change: 1 addition & 0 deletions migrations/create_twill_users_tables.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateTwillUsersTables extends Migration
{
Expand Down
2 changes: 2 additions & 0 deletions routes/admin.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

use Illuminate\Support\Facades\Route;

if (config('twill.enabled.users-management')) {
Route::module('users', ['except' => ['sort', 'feature']]);
}
Expand Down
3 changes: 3 additions & 0 deletions routes/auth.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?php

use Illuminate\Support\Facades\Route;

if (config('twill.enabled.users-management')) {
Route::get('login', 'LoginController@showLoginForm')->name('login.form');
Route::post('login', 'LoginController@login')->name('login');
Expand Down
2 changes: 2 additions & 0 deletions routes/templates.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

use Illuminate\Support\Facades\Route;

Route::get('templates', ['as' => 'templates.index', 'uses' => 'TemplatesController@index']);
Route::get('templates/xhr/{view}', ['as' => 'templates.xhr', 'uses' => 'TemplatesController@xhr']);
Route::get('templates/{view}', ['as' => 'templates.view', 'uses' => 'TemplatesController@view']);
2 changes: 1 addition & 1 deletion src/Commands/Build.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace A17\Twill\Commands;

use File;
use Illuminate\Support\Facades\File;
use Illuminate\Console\Command;
use Symfony\Component\Process\Process;

Expand Down
2 changes: 1 addition & 1 deletion src/Commands/CreateSuperAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use A17\Twill\Models\User;
use Illuminate\Console\Command;
use Validator;
use Illuminate\Support\Facades\Validator;

class CreateSuperAdmin extends Command
{
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/GenerateBlocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace A17\Twill\Commands;

use File;
use Illuminate\Support\Facades\File;
use Illuminate\Console\Command;

class GenerateBlocks extends Command
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/RefreshLQIP.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace A17\Twill\Commands;

use A17\Twill\Models\Media;
use DB;
use Illuminate\Support\Facades\DB;
use Illuminate\Console\Command;
use ImageService;

Expand Down
2 changes: 2 additions & 0 deletions src/Helpers/frontend_helpers.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

use Illuminate\Support\Facades\Cache;

if (!function_exists('revAsset')) {
/**
* @param string $file
Expand Down
2 changes: 2 additions & 0 deletions src/Helpers/helpers.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

use Illuminate\Support\Facades\Event;

// adding this to have a better debug display in Chrome dev tools when
// dd'ing during AJAX requests (see Symfony dumper issue in Chrome > 60:
// https://github.com/symfony/symfony/issues/24688)
Expand Down
2 changes: 2 additions & 0 deletions src/Helpers/media_library_helpers.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

use Illuminate\Support\Facades\Storage;

if (!function_exists('s3Enpoint')) {
/**
* @param string $disk
Expand Down
2 changes: 2 additions & 0 deletions src/Helpers/routes_helpers.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

use Illuminate\Support\Facades\Request;

if (!function_exists('moduleRoute')) {
/**
* @param string $moduleName
Expand Down
4 changes: 2 additions & 2 deletions src/Http/Controllers/Admin/FeaturedController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
use A17\Twill\Models\Feature;
use A17\Twill\Repositories\Behaviors\HandleMedias;
use A17\Twill\Repositories\Behaviors\HandleTranslations;
use DB;
use Event;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Event;

class FeaturedController extends Controller
{
Expand Down
1 change: 0 additions & 1 deletion src/Http/Controllers/Admin/FileLibraryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use A17\Twill\Services\Uploader\SignS3UploadListener;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Http\Request;
use Input;

class FileLibraryController extends ModuleController implements SignS3UploadListener
{
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Controllers/Admin/ForgotPasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace A17\Twill\Http\Controllers\Admin;

use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
use Password;
use Illuminate\Support\Facades\Password;

class ForgotPasswordController extends Controller
{
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Controllers/Admin/ImpersonateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace A17\Twill\Http\Controllers\Admin;

use A17\Twill\Repositories\UserRepository;
use Auth;
use Illuminate\Support\Facades\Auth;

class ImpersonateController extends Controller
{
Expand Down
4 changes: 2 additions & 2 deletions src/Http/Controllers/Admin/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace A17\Twill\Http\Controllers\Admin;

use A17\Twill\Models\User;
use Auth;
use Crypt;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Crypt;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Http\Request;
use PragmaRX\Google2FA\Google2FA;
Expand Down
4 changes: 1 addition & 3 deletions src/Http/Controllers/Admin/MediaLibraryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
use A17\Twill\Services\Uploader\SignS3UploadListener;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Http\Request;
use Input;
use Illuminate\Support\Facades\Storage;

class MediaLibraryController extends ModuleController implements SignS3UploadListener
{
Expand Down Expand Up @@ -140,7 +138,7 @@ public function storeFile($request)

$filename = sanitizeFilename($originalFilename);

$fileDirectory = $request->input('unique_folder_name');
$fileDirectory = $request->input('unique_folder_name');

$disk = config('twill.media_library.disk');

Expand Down
5 changes: 2 additions & 3 deletions src/Http/Controllers/Admin/ModuleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
namespace A17\Twill\Http\Controllers\Admin;

use A17\Twill\Helpers\FlashLevel;
use Auth;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Http\Request;
use Route;
use Session;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Session;

abstract class ModuleController extends Controller
{
Expand Down
8 changes: 4 additions & 4 deletions src/Http/Controllers/Admin/ResetPasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
namespace A17\Twill\Http\Controllers\Admin;

use A17\Twill\Models\User;
use Auth;
use DB;
use Hash;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
use Illuminate\Foundation\Auth\ResetsPasswords;
use Illuminate\Http\Request;
use Password;
use Illuminate\Support\Facades\Password;

class ResetPasswordController extends Controller
{
Expand Down
1 change: 0 additions & 1 deletion src/Http/Controllers/Admin/SettingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace A17\Twill\Http\Controllers\Admin;

use A17\Twill\Repositories\SettingRepository;
use Event;

class SettingController extends Controller
{
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Controllers/Admin/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace A17\Twill\Http\Controllers\Admin;

use A17\Twill\Models\Enums\UserRole;
use Auth;
use Illuminate\Support\Facades\Auth;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Http\Request;
use PragmaRX\Google2FAQRCode\Google2FA;
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Controllers/Front/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use A17\Twill\Http\Controllers\Front\Helpers\Seo;
use Illuminate\Contracts\Debug\ExceptionHandler;
use Illuminate\Routing\Controller as BaseController;
use View;
use Illuminate\Support\Facades\View;

class Controller extends BaseController
{
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Middleware/Impersonate.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace A17\Twill\Http\Middleware;

use Auth;
use Illuminate\Support\Facades\Auth;
use Closure;

class Impersonate
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Middleware/RedirectIfAuthenticated.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace A17\Twill\Http\Middleware;

use Auth;
use Illuminate\Support\Facades\Auth;
use Closure;

class RedirectIfAuthenticated
Expand Down
4 changes: 2 additions & 2 deletions src/Http/Requests/Admin/UserRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace A17\Twill\Http\Requests\Admin;

use Auth;
use Crypt;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Crypt;
use PragmaRX\Google2FA\Google2FA;

class UserRequest extends Request
Expand Down
2 changes: 1 addition & 1 deletion src/Models/Behaviors/HasSlug.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace A17\Twill\Models\Behaviors;

use DB;
use Illuminate\Support\Facades\DB;

trait HasSlug
{
Expand Down
2 changes: 1 addition & 1 deletion src/Models/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace A17\Twill\Models;

use DB;
use Illuminate\Support\Facades\DB;
use FileService;

class File extends Model
Expand Down
2 changes: 1 addition & 1 deletion src/Models/Media.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace A17\Twill\Models;

use DB;
use Illuminate\Support\Facades\DB;
use ImageService;

class Media extends Model
Expand Down
1 change: 0 additions & 1 deletion src/Models/Revision.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace A17\Twill\Models;

use A17\Twill\Models\User;
use Illuminate\Database\Eloquent\Model as BaseModel;

abstract class Revision extends BaseModel
Expand Down
1 change: 0 additions & 1 deletion src/Models/Setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use A17\Twill\Models\Behaviors\HasTranslation;
use A17\Twill\Models\Behaviors\HasMedias;
use A17\Twill\Models\Model;

class Setting extends Model
{
Expand Down
2 changes: 1 addition & 1 deletion src/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Illuminate\Foundation\Auth\Access\Authorizable;
use Illuminate\Foundation\Auth\User as AuthenticatableContract;
use Illuminate\Notifications\Notifiable;
use Session;
use Illuminate\Support\Facades\Session;

class User extends AuthenticatableContract
{
Expand Down
2 changes: 1 addition & 1 deletion src/Repositories/Behaviors/HandleRevisions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace A17\Twill\Repositories\Behaviors;

use Auth;
use Illuminate\Support\Facades\Auth;

trait HandleRevisions
{
Expand Down
2 changes: 1 addition & 1 deletion src/RouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
use Illuminate\Routing\Router;
use Illuminate\Support\Arr;
use Route;
use Illuminate\Support\Facades\Route;

class RouteServiceProvider extends ServiceProvider
{
Expand Down
2 changes: 1 addition & 1 deletion src/Services/Cache/CloudfrontCacheService.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace A17\Twill\Services\Cache;

use Aws\CloudFront\CloudFrontClient;
use Log;
use Illuminate\Support\Facades\Log;

class CloudfrontCacheService
{
Expand Down
2 changes: 1 addition & 1 deletion src/Services/FileLibrary/Disk.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace A17\Twill\Services\FileLibrary;

use Storage;
use Illuminate\Support\Facades\Storage;

class Disk implements FileServiceInterface
{
Expand Down
2 changes: 0 additions & 2 deletions src/Services/Uploader/SignS3Upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace A17\Twill\Services\Uploader;

use A17\Twill\Services\Uploader\SignS3UploadListener;

class SignS3Upload
{
private $bucket;
Expand Down
2 changes: 1 addition & 1 deletion src/TwillServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
use Lsrur\Inspector\Facade\Inspector;
use Lsrur\Inspector\InspectorServiceProvider;
use Spatie\Activitylog\ActivitylogServiceProvider;
use View;
use Illuminate\Support\Facades\View;

class TwillServiceProvider extends ServiceProvider
{
Expand Down
2 changes: 1 addition & 1 deletion src/ValidationServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use A17\Twill\Repositories\BlockRepository;
use Illuminate\Support\ServiceProvider;
use Validator;
use Illuminate\Support\Facades\Validator;

class ValidationServiceProvider extends ServiceProvider
{
Expand Down

0 comments on commit d80ef94

Please sign in to comment.