File XmlDumper.php
has 367 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* MIT License. This file is part of the Propel package.
* For the full copyright and license information, please view the LICENSE
Function appendTableNode
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
private function appendTableNode(Table $table, DOMNode $parentNode): void
{
/** @var \DOMElement $tableNode */
$tableNode = $parentNode->appendChild($this->document->createElement('table'));
$tableNode->setAttribute('name', $table->getCommonName());
- 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 appendTableNode
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function appendTableNode(Table $table, DOMNode $parentNode): void
{
/** @var \DOMElement $tableNode */
$tableNode = $parentNode->appendChild($this->document->createElement('table'));
$tableNode->setAttribute('name', $table->getCommonName());
Function appendColumnNode
has a Cognitive Complexity of 17 (exceeds 5 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());
- 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 appendDatabaseNode
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function appendDatabaseNode(Database $database, DOMNode $parentNode): void
{
/** @var \DOMElement $databaseNode */
$databaseNode = $parentNode->appendChild($this->document->createElement('database'));
$databaseNode->setAttribute('name', $database->getName());
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());
Function appendDatabaseNode
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
private function appendDatabaseNode(Database $database, DOMNode $parentNode): void
{
/** @var \DOMElement $databaseNode */
$databaseNode = $parentNode->appendChild($this->document->createElement('database'));
$databaseNode->setAttribute('name', $database->getName());
- 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 appendForeignKeyNode
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function appendForeignKeyNode(ForeignKey $foreignKey, DOMNode $parentNode): void
{
/** @var \DOMElement $foreignKeyNode */
$foreignKeyNode = $parentNode->appendChild($this->document->createElement('foreign-key'));
$foreignKeyNode->setAttribute('foreignTable', $foreignKey->getForeignTableCommonName());
Function appendForeignKeyNode
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function appendForeignKeyNode(ForeignKey $foreignKey, DOMNode $parentNode): void
{
/** @var \DOMElement $foreignKeyNode */
$foreignKeyNode = $parentNode->appendChild($this->document->createElement('foreign-key'));
$foreignKeyNode->setAttribute('foreignTable', $foreignKey->getForeignTableCommonName());
- 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"