core/Group/Console/Command/GenerateControllerCommand.php
Showing 8 of 8 total issues
Method init
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function init() { $input = $this->getArgv(); if (!isset($input[0])) {
Function init
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
public function init() { $input = $this->getArgv(); if (!isset($input[0])) {
- Read upRead up
The method init uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
Open
} else { $group = 'Web'; $name = $input[0]; }
- Read upRead up
- Exclude checks
Blank line found at start of control structure Open
Open
if (is_dir($dir."/Controller/".$controllerName)) {
- Exclude checks
Space before opening parenthesis of function call prohibited Open
Open
file_put_contents ($dir."/Views/".$controllerName."/"."index.html.twig", $data);
- Exclude checks
Space before opening parenthesis of function call prohibited Open
Open
file_put_contents ($dir."/Controller/".$controllerName."/".$controllerName."Controller.php", $data);
- Exclude checks
Space before opening parenthesis of function call prohibited Open
Open
file_put_contents ($dir."/routing.php", $data);
- Exclude checks
Whitespace found at end of line Open
Open
{
- Exclude checks