Completed
Push — master ( 5075c7...d6d8a1 )
by Elf
05:24
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 0
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 0
loc 10
ccs 0
cts 9
cp 0
crap 2
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace ElfSundae\Laravel\Support\Services\Captcha;
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, $parameters) {
1 ignored issue
show
Unused Code introduced by
The parameter $parameters is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
20
            return captcha_check($value);
21
        });
22
    }
23
}
24