for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Germania\UserRoles\Providers;
use Pimple\Container;
use Pimple\ServiceProviderInterface;
class PimpleServiceProvider implements ServiceProviderInterface
{
/**
* @implements ServiceProviderInterface
*/
public function register(Container $dic)
* @return StdClass
$dic['Roles.Config'] = function( $dic ) {
$dic
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
return (object) [
'all' => [
'guest' => 1,
'registered' => 2,
'superuser' => 3,
'admin' => 4
],
"guests" => [ 1 ],
"new_users" => [ 2 ]
];
};
$dic['Roles.pdo'] = function( $dic ) {
return false;
$dic['Roles.all'] = function( $dic ) {
return (object) $dic['Roles.Config']->all;
* @return array
$dic['Roles.guests'] = function( $dic ) {
return $dic['Roles.Config']->guests;
$dic['Roles.new_users'] = function( $dic ) {
return $dic['Roles.Config']->new_users;
}
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.