EcuadorIdentificationServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
eloc 7
c 2
b 0
f 1
dl 0
loc 22
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 6 1
A register() 0 5 1
1
<?php
2
3
namespace Luilliarcec\LaravelEcuadorIdentification;
4
5
use Illuminate\Support\Facades\Validator;
6
use Illuminate\Support\ServiceProvider;
7
use Luilliarcec\LaravelEcuadorIdentification\Validations\EcuadorIdentification;
8
9
class EcuadorIdentificationServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * Bootstrap the application services.
13
     */
14
    public function boot()
15
    {
16
        Validator::extend(
17
            'ecuador',
18
            EcuadorIdentification::class,
19
            'The :attribute field is invalid.'
20
        );
21
    }
22
23
    /**
24
     * Register the application services.
25
     */
26
    public function register()
27
    {
28
        // Register the main class to use with the facade
29
        $this->app->singleton('EcuadorIdentification', function () {
30
            return new EcuadorIdentification;
31
        });
32
    }
33
}
34