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

ValidationServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 4 1
A boot() 0 8 1
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