MaksHaks/php-project-lvl2

View on GitHub

Showing 2 of 2 total issues

Method findDiff has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function findDiff(array $firstFile, array $secondFile): array
{
    $uniqueKeys = array_unique(array_merge(array_keys($firstFile), array_keys($secondFile)));
    $sortedUniqueKeys = sort($uniqueKeys, fn (string $left, string $right) => strcmp($left, $right));

Severity: Minor
Found in src/Differ.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

            return "'{$value}'";
    Severity: Major
    Found in src/Formatters/Plain.php - About 30 mins to fix
      Severity
      Category
      Status
      Source
      Language