@@ -21,11 +21,11 @@ discard block |
||
21 | 21 | { |
22 | 22 | // Publish configuration files |
23 | 23 | $this->publishes([ |
24 | - __DIR__ . '/../config/captcha.php' => config_path('captcha.php') |
|
24 | + __DIR__.'/../config/captcha.php' => config_path('captcha.php') |
|
25 | 25 | ], 'config'); |
26 | 26 | |
27 | 27 | // HTTP routing |
28 | - if(!config('captcha.disable')){ |
|
28 | + if ( ! config('captcha.disable')) { |
|
29 | 29 | if (strpos($this->app->version(), 'Lumen') !== false) { |
30 | 30 | /* @var Router $router */ |
31 | 31 | $router = $this->app; |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | } else { |
35 | 35 | /* @var Router $router */ |
36 | 36 | $router = $this->app['router']; |
37 | - if ((double)$this->app->version() >= 5.2) { |
|
37 | + if ((double) $this->app->version() >= 5.2) { |
|
38 | 38 | $router->get('captcha/api/{config?}', '\Mews\Captcha\CaptchaController@getCaptchaApi')->middleware('web'); |
39 | 39 | $router->get('captcha/{config?}', '\Mews\Captcha\CaptchaController@getCaptcha')->middleware('web'); |
40 | 40 | } else { |
@@ -48,12 +48,12 @@ discard block |
||
48 | 48 | $validator = $this->app['validator']; |
49 | 49 | |
50 | 50 | // Validator extensions |
51 | - $validator->extend('captcha', function ($attribute, $value, $parameters) { |
|
51 | + $validator->extend('captcha', function($attribute, $value, $parameters) { |
|
52 | 52 | return config('captcha.disable') || ($value && captcha_check($value)); |
53 | 53 | }); |
54 | 54 | |
55 | 55 | // Validator extensions |
56 | - $validator->extend('captcha_api', function ($attribute, $value, $parameters) { |
|
56 | + $validator->extend('captcha_api', function($attribute, $value, $parameters) { |
|
57 | 57 | return config('captcha.disable') || ($value && captcha_api_check($value, $parameters[0], $parameters[1] ?? 'default')); |
58 | 58 | }); |
59 | 59 | } |
@@ -67,12 +67,12 @@ discard block |
||
67 | 67 | { |
68 | 68 | // Merge configs |
69 | 69 | $this->mergeConfigFrom( |
70 | - __DIR__ . '/../config/captcha.php', |
|
70 | + __DIR__.'/../config/captcha.php', |
|
71 | 71 | 'captcha' |
72 | 72 | ); |
73 | 73 | |
74 | 74 | // Bind captcha |
75 | - $this->app->bind('captcha', function ($app) { |
|
75 | + $this->app->bind('captcha', function($app) { |
|
76 | 76 | return new Captcha( |
77 | 77 | $app['Illuminate\Filesystem\Filesystem'], |
78 | 78 | $app['Illuminate\Contracts\Config\Repository'], |