Showing 22 of 26 total issues
Function extractElementFragments
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
protected function extractElementFragments()
{
$elements = array();
$currentCursor = 0;
- 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 extractElementFragments
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
protected function extractElementFragments()
{
$tablesRaw = array();
$tablesRawCursor = 0;
$this->previousChar = 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 appendDifferencesTables
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
protected static function appendDifferencesTables($table1, $table2)
{
$matchedFields = [];
$differences = [
'field-diffs' => [],
- 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 appendDifferencesDatabases
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public static function appendDifferencesDatabases($db1, $db2)
{
$matchedTables = [];
$databaseDiffs = [
- 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 getFirstChunk
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getFirstChunk($string)
{
$firstChar = substr($string, 0, 1);
$secondChar = substr($string, 1, 1);
Function getFirstChunk
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public static function getFirstChunk($string)
{
$firstChar = substr($string, 0, 1);
$secondChar = substr($string, 1, 1);
- 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 execute
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$notFound = false;
$source = $input->getArgument('source');
$destination = $input->getArgument('destination');
Method extractElementFragments
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function extractElementFragments()
{
$elements = array();
$currentCursor = 0;
Function execute
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function execute($databaseName = '')
{
$this->prepareSourceEntries();
if ($this->entries->count() > 0) {
- 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 appendDifferencesTables
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected static function appendDifferencesTables($table1, $table2)
{
$matchedFields = [];
$differences = [
'field-diffs' => [],
Method extractElementFragments
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function extractElementFragments()
{
$tablesRaw = array();
$tablesRawCursor = 0;
$this->previousChar = null;
Method appendDifferencesDatabases
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function appendDifferencesDatabases($db1, $db2)
{
$matchedTables = [];
$databaseDiffs = [
Function getKeyFromString
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function getKeyFromString($fieldString)
{
$pattern = self::$patterns['key'];
preg_match($pattern, $fieldString, $matches);
if ($matches) {
- 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 checkQuotes
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function checkQuotes()
{
if (!$this->inComment() && ($this->previousChar != '\\')) {
if ($this->currentChar == "'") {
$this->inSingleQuote = !$this->inSingleQuote;
- 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 8 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$notFound = false;
$source = $input->getArgument('source');
$outputPath = $input->getArgument('output');
- 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 8 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$notFound = false;
$source = $input->getArgument('source');
$destination = $input->getArgument('destination');
- 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 checkInComment
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function checkInComment()
{
if (!$this->inQuote()) {
if ($this->inMultiLineComment && ($this->currentChar == '/') && ($this->previousChar == '*')) {
$this->inMultiLineComment = 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
Avoid too many return
statements within this method. Open
return ($firstChar === '-') ? '-' . $result : $result;
Avoid too many return
statements within this method. Open
return $buildString;
Function appendDifferencesFields
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected static function appendDifferencesFields($field1, $field2)
{
$differences = [];
if ($field1 !== $field2) {
- 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"