Completed
Push — master ( 270f06...04fd8b )
by ARCANEDEV
12:31
created

ValidationServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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