Showing 18 of 20 total issues
Function processUp
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
function processUp()
{
foreach ($this->knownModels as $modelKey => $knownModel) {
foreach ($knownModel as $targetTable => $columns) {
$constraints = [];
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method waitForSingleInput
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
function waitForSingleInput($closure)
{
if(!function_exists('readline_callback_handler_install')){
$this->waitForInput($closure);
return;
Function waitForSingleInput
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
function waitForSingleInput($closure)
{
if(!function_exists('readline_callback_handler_install')){
$this->waitForInput($closure);
return;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function init
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function init()
{
if (!$this->validate()) {
return;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method init
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
function init()
{
if (!$this->validate()) {
return;
}
Method run
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
function run()
{
if(array_search('v', $this->flags )){
$this->versionHelper->printCliVersion();
Method processUp
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function processUp()
{
foreach ($this->knownModels as $modelKey => $knownModel) {
foreach ($knownModel as $targetTable => $columns) {
$constraints = [];
Method init
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
function init()
{
$helper = new FileHelper($this->cli);
echo "downloading...\n";
// download zip
Function run
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function run()
{
if(array_search('v', $this->flags )){
$this->versionHelper->printCliVersion();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function init
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function init()
{
$this->parseFlags();
if (!isset($this->cli->arguments[2])) {
$this->cli->printLn('Malformed command. Expected format:', 'red');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method writeCtrl
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function writeCtrl()
{
$template = $this->template->readTemplate('route.php');
if (!$template) {
if(!$this->frame){
Function getMethods
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function getMethods()
{
$className = 'Neoan3\\';
if($this->cli->versionHelper->appMainVersion < 3){
if($this->cli->arguments[2] == 'component'){
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function checkProperFormat
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function checkProperFormat(): bool
{
$ok = true;
if (!isset($this->cli->arguments[2])) {
$ok = false;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function createNew
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function createNew($targetStructure = [])
{
$this->cli->printLn('How do you want to call these credentials?');
$this->cli->waitForInput(function ($input) {
$this->credentials[$input] = [];
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function parseCommand
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function parseCommand()
{
if(!isset($this->cli->arguments[1]) || !isset($this->cli->arguments[2])){
$this->cli->printLn('Malformed command', 'red');
$this->cli->printLn('neoan3 set <variable> <value>', 'yellow');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function processDown
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function processDown()
{
foreach ($this->knownModels as $modelKey => $knownModel) {
$migrate = [];
foreach ($this->knownTables as $tableKey => $knownTable) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function generateFiles
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function generateFiles()
{
$this->fileHelper->createDirectory($this->folder);
switch ($this->type) {
case 'route':
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function writeCtrl
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function writeCtrl()
{
$template = $this->template->readTemplate('route.php');
if (!$template) {
if(!$this->frame){
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"