Showing 16 of 16 total issues
Function dataOut
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
function dataOut($data, $action, $tree, $parent)
{
static $counter;
$counter++;
$value = "";
- 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 dataOut
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
function dataOut($data, $action, $tree, $parent)
{
static $counter;
$counter++;
$result = '';
- 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 dataOut
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
function dataOut($data, $action, $tree, $parent)
{
static $counter;
$counter++;
$value = "";
Function getChildren
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function getChildren($data, $file)
{
$func = function ($carry, $item) {
if (is_array($item)) {
- 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 diffAst
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function diffAst($beforeData, $afterData)
{
$ast = [];
$depthOfData = setGetDepth($beforeData, $afterData, 'set');
$before = $depthOfData[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 dataOut
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
function dataOut($data, $action, $tree, $parent)
{
static $counter;
$counter++;
$result = '';
Function viewDiff
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function viewDiff($data, $file)
{
$func = function ($carry, $item) use ($file) {
if (is_array($item)) {
$ak = array_keys($item);
- 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 diffAst
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function diffAst($beforeData, $afterData)
{
$ast = [];
$depthOfData = setGetDepth($beforeData, $afterData, 'set');
$before = $depthOfData[0];
Function viewDiff
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function viewDiff($data, $format)
{
if ($format == "pretty") {
$dataOut = "Diff\Viewpretty\dataOut";
}
- 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 getChildren
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function getChildren($data, $dataOut, $parent)
{
$func = function ($carry, $item) use ($dataOut, $parent) {
if (is_array($item)) {
- 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 dataOut
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function dataOut($data, $action, $tree, $parent)
{
$result = '';
$path = '';
foreach ($parent as $value) {
- 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 viewDiff
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function viewDiff($data, $format)
{
if ($format == "pretty") {
$dataOut = "Diff\Viewpretty\dataOut";
}
Method diff
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function diff($files)
{
$before = $files[0];
$after = $files[1];
$union = Funct\Collection\union(array_keys($before), array_keys($after));
Method newNodeAst
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function newNodeAst($key, $status, $beforeVal, $afterVal, $tree, $children)
Function diff
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function diff($files)
{
$before = $files[0];
$after = $files[1];
$union = Funct\Collection\union(array_keys($before), array_keys($after));
- 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 objToArray
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function objToArray($obj)
{
if (is_object($obj)) {
$obj = (array) $obj;
}
- 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"