Completed
Push — master ( b3f467...3d5acc )
by Elf
05:46
created

CaptchaServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 0
loc 10
ccs 7
cts 7
cp 1
crap 1
rs 9.4285
c 1
b 0
f 0
1
<?php
2
3
namespace App\Support\Providers;
4
5
use Mews\Captcha\CaptchaServiceProvider as ServiceProvider;
6
7
class CaptchaServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Override the original Captcha service provider to remove the default routing.
11
     */
12 1
    public function boot()
13
    {
14 1
        $this->publishes([
15 1
            base_path('vendor/mews/captcha/config/captcha.php') => config_path('captcha.php'),
16 1
        ], 'config');
17
18 1
        $this->app['validator']->extend('captcha', function ($attribute, $value, $parameters) {
19
            return captcha_check($value);
20 1
        });
21 1
    }
22
}
23