ValidationServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 26
ccs 6
cts 6
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
    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