ValidationExtendServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 2
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 5
rs 10
1
<?php
2
3
namespace XLaravel\ValidationExtend\Providers;
4
5
use Illuminate\Support\ServiceProvider;
6
use Illuminate\Support\Facades\Validator;
7
8
class ValidationExtendServiceProvider extends ServiceProvider
9
{
10
    public function boot()
11
    {
12
        $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'X-Laravel');
13
14
        Validator::extend('human_name', 'XLaravel\ValidationExtend\Rules\HumanNameRule@passes');
15
    }
16
}
17