1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-30 17:19:50 +02:00

Merge pull request #514 from GuusDeGraeve/patch-1

replace get_class with instanceof for $this->app
This commit is contained in:
Oliver Vogel
2016-02-26 19:15:43 +01:00

View File

@@ -2,7 +2,6 @@
namespace Intervention\Image;
use Illuminate\Foundation\Application;
use Illuminate\Support\ServiceProvider;
class ImageServiceProvider extends ServiceProvider
@@ -61,9 +60,9 @@ class ImageServiceProvider extends ServiceProvider
*/
private function getProvider()
{
if (get_class($this->app) == 'Laravel\Lumen\Application') {
if ($this->app instanceof \Laravel\Lumen\Application) {
$provider = '\Intervention\Image\ImageServiceProviderLumen';
} elseif (version_compare(Application::VERSION, '5.0', '<')) {
} elseif (version_compare(\Illuminate\Foundation\Application::VERSION, '5.0', '<')) {
$provider = '\Intervention\Image\ImageServiceProviderLaravel4';
} else {
$provider = '\Intervention\Image\ImageServiceProviderLaravel5';