From 58db25b9f5bef52b9cac0678e79eb2b8f1b322cb Mon Sep 17 00:00:00 2001 From: Nicolas Widart Date: Fri, 5 Jun 2015 15:16:16 +0200 Subject: [PATCH] Use the ::class notation Prefix the namespace with \ --- app/Console/Kernel.php | 2 +- app/Exceptions/Handler.php | 2 +- app/Http/Kernel.php | 18 +++++++++--------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index ce12d9ef..0aad2598 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -13,7 +13,7 @@ class Kernel extends ConsoleKernel * @var array */ protected $commands = [ - 'App\Console\Commands\Inspire', + \App\Console\Commands\Inspire::class, ]; /** diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 57e63cd4..7c9b365a 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -13,7 +13,7 @@ class Handler extends ExceptionHandler * @var array */ protected $dontReport = [ - 'Symfony\Component\HttpKernel\Exception\HttpException', + \Symfony\Component\HttpKernel\Exception\HttpException::class, ]; /** diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 7b4b4afa..46612bf5 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -12,12 +12,12 @@ class Kernel extends HttpKernel * @var array */ protected $middleware = [ - 'Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode', - 'Illuminate\Cookie\Middleware\EncryptCookies', - 'Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse', - 'Illuminate\Session\Middleware\StartSession', - 'Illuminate\View\Middleware\ShareErrorsFromSession', - 'App\Http\Middleware\VerifyCsrfToken', + \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class, + \Illuminate\Cookie\Middleware\EncryptCookies::class, + \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, + \Illuminate\Session\Middleware\StartSession::class, + \Illuminate\View\Middleware\ShareErrorsFromSession::class, + \App\Http\Middleware\VerifyCsrfToken::class, ]; /** @@ -26,8 +26,8 @@ class Kernel extends HttpKernel * @var array */ protected $routeMiddleware = [ - 'auth' => 'App\Http\Middleware\Authenticate', - 'auth.basic' => 'Illuminate\Auth\Middleware\AuthenticateWithBasicAuth', - 'guest' => 'App\Http\Middleware\RedirectIfAuthenticated', + 'auth' => \App\Http\Middleware\Authenticate::class, + 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, + 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, ]; }