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

MewsCaptchaServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 6
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 10
ccs 0
cts 9
cp 0
crap 2
rs 9.4285
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