Showing 693 of 740 total issues
Method execute
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output): int
{
$configOptions = [];
foreach ($input->getOptions() as $key => $option) {
Method addClearAllReferences
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addClearAllReferences(string &$script): void
{
$table = $this->getTable();
$script .= "
/**
Method addCrossFKInit
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addCrossFKInit(string &$script, CrossForeignKeys $crossFKs): void
{
$inits = [];
if (1 < count($crossFKs->getCrossForeignKeys()) || $crossFKs->getUnclassifiedPrimaryKeys()) {
Method appendColumnNode
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function appendColumnNode(Column $column, DOMNode $parentNode): void
{
/** @var \DOMElement $columnNode */
$columnNode = $parentNode->appendChild($this->document->createElement('column'));
$columnNode->setAttribute('name', $column->getName());
Method addIsVersioningNecessary
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addIsVersioningNecessary(string &$script): void
{
$queryClassName = $this->builder->getQueryClassName();
$script .= "
Method addFilterByFk
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addFilterByFk(string &$script, ForeignKey $fk): void
{
$this->declareClasses(
'\Propel\Runtime\Collection\ObjectCollection',
'\Propel\Runtime\Exception\PropelException',
Method getModifyTableDDL
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getModifyTableDDL(TableDiff $tableDiff): string
{
$ret = '';
$toTable = $tableDiff->getToTable();
Method convert
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function convert(array $c): string
{
$conf = [];
// set datasources
if (isset($c['connections'])) {
Method addMoveSubtreeTo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addMoveSubtreeTo(string &$script): void
{
$queryClassName = $this->builder->getQueryClassName();
$tableMapClass = $this->builder->getTableMapClass();
$useScope = $this->behavior->useScope();
Function create
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public static function create(
array $configuration,
AdapterInterface $adapter,
string $defaultConnectionClass = self::DEFAULT_CONNECTION_CLASS
): ConnectionInterface {
- 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 toArray
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function toArray(string $data, ?string $rootKey = null, bool $isList = false, bool $includeHeading = true): array
{
$rows = explode($this->lineTerminator, $data);
if ($includeHeading) {
$heading = array_shift($rows);
- 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 getClassesForTable
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function getClassesForTable(Table $table, ?array $classTargets = null): string
{
$classTargets = $classTargets ?? $this->classTargets;
$script = '';
- 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 getDefaultValueString
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
protected function getDefaultValueString(Column $column): string
{
$defaultValue = var_export(null, true);
$val = $column->getPhpDefaultValue();
if ($val === null) {
- 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 execute
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output): int
{
$configOptions = [];
foreach ($input->getOptions() as $key => $option) {
- 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 addFKAccessor
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
protected function addFKAccessor(string &$script, ForeignKey $fk): void
{
$varName = $this->getFKVarName($fk);
$fkQueryBuilder = $this->getNewStubQueryBuilder($fk->getForeignTable());
$fkObjectBuilder = $this->getNewObjectBuilder($fk->getForeignTable())->getStubObjectBuilder();
- 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 normalizeTable
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function normalizeTable(Table $table): void
{
if ($table->hasForeignKeys()) {
foreach ($table->getForeignKeys() as $fk) {
if ($fk->getForeignTable() && !$fk->getForeignTable()->isUnique($fk->getForeignColumnObjects())) {
- 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 setSchema
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function setSchema(?string $schema): void
{
$oldSchema = $this->schema;
if ($this->schema !== $schema && $this->getPlatform()) {
$schemaDelimiter = $this->getPlatform()->getSchemaDelimiter();
- 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 getAddTableDDL
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function getAddTableDDL(Table $table): string
{
$lines = [];
foreach ($table->getColumns() as $column) {
- 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 addUpdateLoadedNodes
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
protected function addUpdateLoadedNodes(string &$script): void
{
$queryClassName = $this->queryClassName;
$objectClassName = $this->objectClassName;
$tableMapClassName = $this->tableMapClassName;
- 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 isColumnForeignKeyOrDuplicated
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
protected function isColumnForeignKeyOrDuplicated(Column $column): bool
{
$delegateTable = $column->getTable();
$table = $this->getTable();
$fks = [];
- 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"