JuliaStrelkova/project-lvl2-s427

View on GitHub
src/Renderer/RendererPretty.php

Summary

Maintainability
A
2 hrs
Test Coverage

Method render has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function render(array $data, int $level = 0): string
    {
        $indentation = $this->renderIndentation($level);

        $result = array_reduce(
Severity: Minor
Found in src/Renderer/RendererPretty.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

                            return implode(
                                '',
                                [$acc, $indentation, '  + ', $item['key'], ': ', $newRenderedValue, PHP_EOL]
                            );
    Severity: Major
    Found in src/Renderer/RendererPretty.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

              return implode('', ['{', PHP_EOL, $result, $indentation, '}',]);
      Severity: Major
      Found in src/Renderer/RendererPretty.php - About 30 mins to fix

        There are no issues that match your filters.

        Category
        Status