Code Duplication    Length = 3-3 lines in 2 locations

src/Commands/ResourcesCommand.php 2 locations

@@ 454-456 (lines=3) @@
451
                    $this->checkError($relation['0'] . ": undefined (used in " . $rType . "-based relationship of model " . $relation['2'] . " in file " . $nodes[$relation['2']]['filename'] . ")");
452
                } else if (class_exists($this->getNamespace() . '\\' . ucwords(camel_case($relation['0'])))) {
453
                    $this->checkInfo(studly_case(str_singular($relation['0'])) . ": already defined in Namespace " . $this->getNamespace() . " (used in " . $rType . "-based relationship of model " . $relation['2'] . " in file " . $nodes[$relation['2']]['filename'] . ")");
454
                } else if (class_exists('App\\' . ucwords(camel_case($relation['0'])))) {
455
                    $this->checkInfo(studly_case(str_singular($relation['0'])) . ": already defined in Namespace App\\ (used in " . $rType . "-based relationship of model " . $relation['2'] . " in file " . $nodes[$relation['2']]['filename'] . ")");
456
                }
457
458
                if ($rType == "pivot" && empty($nodes[$relation['1']]) && !class_exists($this->getNamespace() . '\\' . ucwords(camel_case($relation['1']))) && !class_exists('App\\' . ucwords(camel_case($relation['1'])))) {
459
                    $this->checkError($relation['1'] . ": undefined (used in " . $rType . "-based relationship of model " . $relation['2'] . " in file " . $nodes[$relation['2']]['filename'] . ")");
@@ 462-464 (lines=3) @@
459
                    $this->checkError($relation['1'] . ": undefined (used in " . $rType . "-based relationship of model " . $relation['2'] . " in file " . $nodes[$relation['2']]['filename'] . ")");
460
                } else if ($rType == "pivot" && class_exists($this->getNamespace() . '\\' . ucwords(camel_case($relation['1'])))) {
461
                    $this->checkInfo(studly_case(str_singular($relation['1'])) . ": already defined in Namespace " . $this->getNamespace() . " (used in " . $rType . "-based relationship of model " . $relation['2'] . " in file " . $nodes[$relation['2']]['filename'] . ")");
462
                } else if ($rType == "pivot" && class_exists('App\\' . ucwords(camel_case($relation['1'])))) {
463
                    $this->checkInfo(studly_case(str_singular($relation['1'])) . ": already defined in Namespace App\\ (used in " . $rType . "-based relationship of model " . $relation['2'] . " in file " . $nodes[$relation['2']]['filename'] . ")");
464
                }
465
            }
466
        }
467
    }