Completed
Push — master ( 04fd8b...0cf18b )
by ARCANEDEV
9s
created

ValidationServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 8
ccs 5
cts 5
cp 1
crap 1
rs 9.4285
1
<?php namespace Arcanedev\Currencies\Providers;
2
3
use Arcanedev\Currencies\Validators\CurrencyValidator;
4
use Arcanedev\Support\ServiceProvider;
5
6
/**
7
 * Class     ValidationServiceProvider
8
 *
9
 * @package  Arcanedev\Currencies\Providers
10
 * @author   ARCANEDEV <[email protected]>
11
 */
12
class ValidationServiceProvider extends ServiceProvider
13
{
14
    /* ------------------------------------------------------------------------------------------------
15
     |  Main Functions
16
     | ------------------------------------------------------------------------------------------------
17
     */
18
    /**
19
     * Register the service provider.
20
     *
21
     * @return void
22
     */
23 468
    public function register()
24
    {
25
        //
26 468
    }
27
28
    /**
29
     * Boot the service provider.
30
     */
31 468
    public function boot()
32
    {
33
        /** @var \Illuminate\Validation\Factory $validator */
34 468
        $validator = $this->app['validator'];
35
36 468
        $validator->extend('currency_iso',       CurrencyValidator::class.'@validateCurrencyIso');
37 468
        $validator->extend('currency_supported', CurrencyValidator::class.'@validateCurrencySupported');
38 468
    }
39
}
40