ValidationServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
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 3
cts 3
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
    public function register()
22
    {
23 612
        //
24
    }
25
26 612
    /**
27
     * Boot the service provider.
28
     */
29
    public function boot()
30
    {
31 612
        /** @var \Illuminate\Validation\Factory $validator */
32
        $validator = $this->app['validator'];
33
34 612
        $validator->extend('currency_iso',       CurrencyValidator::class.'@validateCurrencyIso');
35
        $validator->extend('currency_supported', CurrencyValidator::class.'@validateCurrencySupported');
36 612
    }
37
}
38