From 16e37cb3704d1dc0bb7a55ef1747eb3c742f439f Mon Sep 17 00:00:00 2001 From: Pantelis Peslis Date: Mon, 8 Jun 2015 10:29:33 +0300 Subject: [PATCH] Use the ::class notation --- artisan | 2 +- bootstrap/app.php | 12 ++++++------ database/factories/ModelFactory.php | 2 +- public/index.php | 2 +- tests/TestCase.php | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/artisan b/artisan index f3099778..df630d0d 100755 --- a/artisan +++ b/artisan @@ -28,7 +28,7 @@ $app = require_once __DIR__.'/bootstrap/app.php'; | */ -$kernel = $app->make('Illuminate\Contracts\Console\Kernel'); +$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class); $status = $kernel->handle( $input = new Symfony\Component\Console\Input\ArgvInput, diff --git a/bootstrap/app.php b/bootstrap/app.php index 22712ffe..f2801adf 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -27,18 +27,18 @@ */ $app->singleton( - 'Illuminate\Contracts\Http\Kernel', - 'App\Http\Kernel' + Illuminate\Contracts\Http\Kernel::class, + App\Http\Kernel::class ); $app->singleton( - 'Illuminate\Contracts\Console\Kernel', - 'App\Console\Kernel' + Illuminate\Contracts\Console\Kernel::class, + App\Console\Kernel::class ); $app->singleton( - 'Illuminate\Contracts\Debug\ExceptionHandler', - 'App\Exceptions\Handler' + Illuminate\Contracts\Debug\ExceptionHandler::class, + App\Exceptions\Handler::class ); /* diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php index ec573582..ae7165b8 100644 --- a/database/factories/ModelFactory.php +++ b/database/factories/ModelFactory.php @@ -11,7 +11,7 @@ | */ -$factory->define('App\User', function ($faker) { +$factory->define(App\User::class, function ($faker) { return [ 'name' => $faker->name, 'email' => $faker->email, diff --git a/public/index.php b/public/index.php index 0dc49c12..c5820533 100644 --- a/public/index.php +++ b/public/index.php @@ -47,7 +47,7 @@ | */ -$kernel = $app->make('Illuminate\Contracts\Http\Kernel'); +$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); $response = $kernel->handle( $request = Illuminate\Http\Request::capture() diff --git a/tests/TestCase.php b/tests/TestCase.php index 824705d0..8578b17e 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -18,7 +18,7 @@ public function createApplication() { $app = require __DIR__.'/../bootstrap/app.php'; - $app->make('Illuminate\Contracts\Console\Kernel')->bootstrap(); + $app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); return $app; }