Showing 6 of 6 total issues
Method renderPretty
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function renderPretty($ast, $depth = 0)
{
$indent = str_repeat(' ', $depth);
$result = array_map(function ($node) use ($indent, $depth) {
Method renderPlain
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function renderPlain($data, $parent = null)
{
$result = array_map(function ($node) use ($parent) {
$type = $node['type'];
$key = $node['key'];
Method createNode
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function createNode($key, $type, $oldValue, $newValue, $children = null)
Avoid too many return
statements within this method. Open
Open
return '{' . PHP_EOL . $output . $indent . '}';
Avoid too many return
statements within this method. Open
Open
return $output;
Avoid too many return
statements within this method. Open
Open
return $indent . ' ' . $key . ': ' . renderPretty($children, $depth + 1);