Total Complexity | 2 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class IdentityNumberServiceProvider extends ServiceProvider |
||
8 | { |
||
9 | /** |
||
10 | * Perform post-registration booting of services. |
||
11 | * |
||
12 | * @return void |
||
13 | */ |
||
14 | public function boot() |
||
15 | { |
||
16 | /** |
||
17 | * Extend the Laravel Validator with the "identity_number" rule |
||
18 | */ |
||
19 | $this->app['validator']->extend('identity_number', function($attribute, $value, $parameters) |
||
|
|||
20 | { |
||
21 | return Pin::isValid($value, 'identity'); |
||
22 | }); |
||
23 | |||
24 | /** |
||
25 | * Extend the Laravel Validator with the "organization_number" rule |
||
26 | */ |
||
27 | $this->app['validator']->extend('organization_number', function($attribute, $value, $parameters) |
||
28 | { |
||
29 | return Pin::isValid($value, 'organization'); |
||
30 | }); |
||
31 | |||
32 | /** |
||
33 | * Extend the Laravel Validator with the "coordination_number" rule |
||
34 | */ |
||
35 | $this->app['validator']->extend('coordination_number', function($attribute, $value, $parameters) |
||
36 | { |
||
37 | return Pin::isValid($value, 'coordination'); |
||
38 | }); |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * Register any package services. |
||
43 | * |
||
44 | * @return void |
||
45 | */ |
||
46 | public function register() |
||
48 | // |
||
49 | } |
||
51 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.