F9/Console/ConsoleFactory.php
Method registerInstances
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private function registerInstances($config, $app, $events, $container, $global_scope)
Avoid too many return
statements within this method. Open
Open
return [$global_scope, $config, $events];
Avoid too many return
statements within this method. Open
Open
$container->add('config', function () use ($container) { return $container['Config']; });
Avoid unused private methods such as 'makeConsole'. Open
Open
private function makeConsole(array $paths) : Console
{
// register and collection common class objects
list($global_scope, $config, $events) = $this->registerClasses($paths, static::$container);
- Read upRead up
- Exclude checks
UnusedPrivateMethod
Since: 0.2
Unused Private Method detects when a private method is declared but is unused.
Example
class Something
{
private function foo() {} // unused
}
Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod
The parameter $global_scope is not named in camelCase. Open
Open
private function registerInstances($config, $app, $events, $container, $global_scope)
{
$app['config'] = $config;
$app['nine.events'] = $events;
$app['illuminate.container'] = $container;
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The variable $global_scope is not named in camelCase. Open
Open
private function registerInstances($config, $app, $events, $container, $global_scope)
{
$app['config'] = $config;
$app['nine.events'] = $events;
$app['illuminate.container'] = $container;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $global_scope is not named in camelCase. Open
Open
private function registerClasses(array $paths, $container)
{
// we'll start by loading the configuration into the Forge Container
$container->add(ContainerInterface::class, function () { return Forge::getInstance(); });
$container->add([Scope::class, 'context'], function () { return new Scope; });
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $global_scope is not named in camelCase. Open
Open
private function makeConsole(array $paths) : Console
{
// register and collection common class objects
list($global_scope, $config, $events) = $this->registerClasses($paths, static::$container);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $global_scope is not named in camelCase. Open
Open
private function registerClasses(array $paths, $container)
{
// we'll start by loading the configuration into the Forge Container
$container->add(ContainerInterface::class, function () { return Forge::getInstance(); });
$container->add([Scope::class, 'context'], function () { return new Scope; });
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $global_scope is not named in camelCase. Open
Open
private function makeConsole(array $paths) : Console
{
// register and collection common class objects
list($global_scope, $config, $events) = $this->registerClasses($paths, static::$container);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}