VaLeraGav/php-project-lvl2

View on GitHub

Showing 7 of 7 total issues

Method build has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function build(object $objFirst, object $objSecond): array
{
    $keyObjFirst = array_keys(get_object_vars($objFirst));
    $keyObjSecond = array_keys(get_object_vars($objSecond));
    $uniqueKeys = array_unique(array_merge($keyObjFirst, $keyObjSecond));
Severity: Minor
Found in src/Builder.php - About 1 hr to fix

    Method iter has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function iter(array $data, int $depth = 0)
    {
        $indent = str_repeat(' ', 4 * $depth);
        $stylish = array_map(function ($unit) use ($indent, $depth) {
    
    
    Severity: Minor
    Found in src/Formatters/Stylish.php - About 1 hr to fix

      Avoid too many return statements within this method.
      Open

                      return "{$indent}    {$name}: {\n{$children}\n{$indent}    }";
      Severity: Major
      Found in src/Formatters/Stylish.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

            return "{\n{$result}\n{$indent}}";
        Severity: Major
        Found in src/Formatters/Stylish.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

              return $result;
          Severity: Major
          Found in src/Formatters/Plain.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                return implode("\n", $stylish);
            Severity: Major
            Found in src/Formatters/Stylish.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                              return;
              Severity: Major
              Found in src/Formatters/Plain.php - About 30 mins to fix
                Severity
                Category
                Status
                Source
                Language