olssonm /
identity-number
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace Olssonm\IdentityNumber; |
||||
| 4 | |||||
| 5 | use Illuminate\Support\ServiceProvider; |
||||
| 6 | |||||
| 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) |
||||
|
0 ignored issues
–
show
|
|||||
| 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) |
||||
|
0 ignored issues
–
show
The parameter
$parameters is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. Loading history...
|
|||||
| 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) |
||||
|
0 ignored issues
–
show
The parameter
$parameters is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. Loading history...
|
|||||
| 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() |
||||
| 47 | { |
||||
| 48 | // |
||||
| 49 | } |
||||
| 50 | } |
||||
| 51 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.