for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Olssonm\IdentityNumber;
use Illuminate\Support\ServiceProvider;
class IdentityNumberServiceProvider extends ServiceProvider
{
/**
* Perform post-registration booting of services.
*
* @return void
*/
public function boot()
* Extend the Laravel Validator with the "identity_number" rule
$this->app['validator']->extend('identity_number', function($attribute, $value, $parameters)
$parameters
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
$this->app['validator']->extend('identity_number', function($attribute, $value, /** @scrutinizer ignore-unused */ $parameters)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
return Pin::isValid($value, 'identity');
});
* Extend the Laravel Validator with the "organization_number" rule
$this->app['validator']->extend('organization_number', function($attribute, $value, $parameters)
$this->app['validator']->extend('organization_number', function($attribute, $value, /** @scrutinizer ignore-unused */ $parameters)
return Pin::isValid($value, 'organization');
* Extend the Laravel Validator with the "coordination_number" rule
$this->app['validator']->extend('coordination_number', function($attribute, $value, $parameters)
$this->app['validator']->extend('coordination_number', function($attribute, $value, /** @scrutinizer ignore-unused */ $parameters)
return Pin::isValid($value, 'coordination');
}
* Register any package services.
public function register()
//
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.