for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Core\Interfaces;
use Core\App;
use Slim\Container;
use Composer\Autoload\ClassLoader;
abstract class AbstractModule
{
/**
* Get config array for this module
* @return array
*/
public function getModuleConfig()
return [];
}
* Set class maps for class loader to autoload classes for this module
* @param Container $container
* @return void
public function initDependencies(Container $container)
$container
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function initDependencies(/** @scrutinizer ignore-unused */ Container $container)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
* Initiate app middleware, route middleware should go in load() with routes
* @param App $app
public function initMiddleware(App $app)
$app
public function initMiddleware(/** @scrutinizer ignore-unused */ App $app)
* Load is run last, when config, dependencies, etc have been initiated
* Routes ought to go here
public function initRoutes(App $app)
public function initRoutes(/** @scrutinizer ignore-unused */ App $app)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.