@@ -74,8 +74,8 @@ |
||
74 | 74 | 'captcha' |
75 | 75 | ); |
76 | 76 | |
77 | - // Bind the ImageManager with an explicit driver |
|
78 | - if (!$this->app->bound('Intervention\Image\ImageManager')) { |
|
77 | + // Bind the ImageManager with an explicit driver |
|
78 | + if (!$this->app->bound('Intervention\Image\ImageManager')) { |
|
79 | 79 | $this->app->singleton('Intervention\Image\ImageManager', function ($app) { |
80 | 80 | // Determine which driver to use, defaulting to 'gd' |
81 | 81 | $driver = config('captcha.driver', 'gd') === 'imagick' ? new ImagickDriver() : new GdDriver(); |
@@ -24,11 +24,11 @@ discard block |
||
24 | 24 | { |
25 | 25 | // Publish configuration files |
26 | 26 | $this->publishes([ |
27 | - __DIR__ . '/../config/captcha.php' => config_path('captcha.php') |
|
27 | + __DIR__.'/../config/captcha.php' => config_path('captcha.php') |
|
28 | 28 | ], 'config'); |
29 | 29 | |
30 | 30 | // HTTP routing |
31 | - if(!config('captcha.disable')){ |
|
31 | + if ( ! config('captcha.disable')) { |
|
32 | 32 | if (strpos($this->app->version(), 'Lumen') !== false) { |
33 | 33 | /* @var Router $router */ |
34 | 34 | $router = $this->app; |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | } else { |
38 | 38 | /* @var Router $router */ |
39 | 39 | $router = $this->app['router']; |
40 | - if ((double)$this->app->version() >= 5.2) { |
|
40 | + if ((double) $this->app->version() >= 5.2) { |
|
41 | 41 | $router->get('captcha/api/{config?}', '\Mews\Captcha\CaptchaController@getCaptchaApi')->middleware('web'); |
42 | 42 | $router->get('captcha/{config?}', '\Mews\Captcha\CaptchaController@getCaptcha')->middleware('web'); |
43 | 43 | } else { |
@@ -51,12 +51,12 @@ discard block |
||
51 | 51 | $validator = $this->app['validator']; |
52 | 52 | |
53 | 53 | // Validator extensions |
54 | - $validator->extend('captcha', function ($attribute, $value, $parameters) { |
|
54 | + $validator->extend('captcha', function($attribute, $value, $parameters) { |
|
55 | 55 | return config('captcha.disable') || ($value && captcha_check($value)); |
56 | 56 | }); |
57 | 57 | |
58 | 58 | // Validator extensions |
59 | - $validator->extend('captcha_api', function ($attribute, $value, $parameters) { |
|
59 | + $validator->extend('captcha_api', function($attribute, $value, $parameters) { |
|
60 | 60 | return config('captcha.disable') || ($value && captcha_api_check($value, $parameters[0], $parameters[1] ?? 'default')); |
61 | 61 | }); |
62 | 62 | } |
@@ -70,13 +70,13 @@ discard block |
||
70 | 70 | { |
71 | 71 | // Merge configs |
72 | 72 | $this->mergeConfigFrom( |
73 | - __DIR__ . '/../config/captcha.php', |
|
73 | + __DIR__.'/../config/captcha.php', |
|
74 | 74 | 'captcha' |
75 | 75 | ); |
76 | 76 | |
77 | 77 | // Bind the ImageManager with an explicit driver |
78 | - if (!$this->app->bound('Intervention\Image\ImageManager')) { |
|
79 | - $this->app->singleton('Intervention\Image\ImageManager', function ($app) { |
|
78 | + if ( ! $this->app->bound('Intervention\Image\ImageManager')) { |
|
79 | + $this->app->singleton('Intervention\Image\ImageManager', function($app) { |
|
80 | 80 | // Determine which driver to use, defaulting to 'gd' |
81 | 81 | $driver = config('captcha.driver', 'gd') === 'imagick' ? new ImagickDriver() : new GdDriver(); |
82 | 82 | |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | } |
86 | 86 | |
87 | 87 | // Bind captcha |
88 | - $this->app->bind('captcha', function ($app) { |
|
88 | + $this->app->bind('captcha', function($app) { |
|
89 | 89 | return new Captcha( |
90 | 90 | $app['Illuminate\Filesystem\Filesystem'], |
91 | 91 | $app['Illuminate\Contracts\Config\Repository'], |