Showing 9 of 9 total issues
Method genDiff
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function genDiff($pathToFile1, $pathToFile2, $format = 'pretty')
{
$readData1 = readFile($pathToFile1);
$readData2 = readFile($pathToFile2);
Method format
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function format($ast)
{
$currentDepth = 1;
$buildDiff = function ($ast, $currentDepth) use (&$buildDiff) {
$iter = array_map(function ($node) use ($buildDiff, $currentDepth) {
Avoid too many return
statements within this method. Open
Open
return "{\n{$diffToString}\n}";
Avoid too many return
statements within this method. Open
Open
return $buildDiff($node['children'], $pathToKey);
Avoid too many return
statements within this method. Open
Open
return formatterToPretty\format($ast);
Avoid too many return
statements within this method. Open
Open
return $iter;
Avoid too many return
statements within this method. Open
Open
return $buildDiff($ast, '');
Avoid too many return
statements within this method. Open
Open
return " {$key}: {\n{$subDiffToString}\n }";
Avoid too many return
statements within this method. Open
Open
return implode("\n", $iter);