Showing 5 of 5 total issues
Method render
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function render(array $data, int $level = 0): string
{
$indentation = $this->renderIndentation($level);
$result = array_reduce(
Method render
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function render(array $data, array $keyChain = []): string
{
$rows = array_reduce(
$data,
function (array $acc, array $item) use ($keyChain) {
Method buildNode
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private function buildNode(string $type, string $key, $oldValue = null, $newValue = null, $children = null): array
Avoid too many return
statements within this method. Open
Open
return implode(
'',
[$acc, $indentation, ' + ', $item['key'], ': ', $newRenderedValue, PHP_EOL]
);
Avoid too many return
statements within this method. Open
Open
return implode('', ['{', PHP_EOL, $result, $indentation, '}',]);