Completed
Push — master ( 94e14d...b48540 )
by Elf
04:53
created

CaptchaServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 87.5%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 16
ccs 7
cts 8
cp 0.875
rs 10
c 1
b 0
f 0
wmc 1
lcom 1
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A boot() 0 10 1
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