Completed
Push — master ( e34aec...b0547c )
by Elf
06:14
created

MewsCaptchaServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 17
ccs 0
cts 9
cp 0
rs 10
wmc 1
lcom 1
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A boot() 0 10 1
1
<?php
2
3
namespace ElfSundae\Laravel\Support\Services\MewsCaptcha;
4
5
use Mews\Captcha\CaptchaServiceProvider as ServiceProvider;
6
7
class MewsCaptchaServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Override the original Captcha service provider to
11
     * remove the default routing.
12
     */
13
    public function boot()
14
    {
15
        $this->publishes([
16
            base_path('vendor/mews/captcha/config/captcha.php') => config_path('captcha.php'),
17
        ], 'config');
18
19
        $this->app['validator']->extend('captcha', function ($attribute, $value) {
20
            return captcha_check($value);
21
        });
22
    }
23
}
24