fey/php-project-lvl2

View on GitHub

Showing 4 of 27 total issues

Method makeAstDiff has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function makeAstDiff($data1, $data2): array
{
    $makeDiff = function ($data1, $data2) use (&$makeDiff): array {
        $nodesNames = array_keys(array_merge((array)$data1, (array)$data2));

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

    Method format has 42 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function format(array $diff): string
    {
        $format = function ($diff, $level) use (&$format) {
            return array_map(
                function ($node) use ($level, $format) {
    Severity: Minor
    Found in src/Formatters/Stylish.php - About 1 hr to fix

      Method format has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function format(array $diff): string
      {
          $format = function ($nodes, $nodePath) use (&$format) {
              return array_map(function ($node) use ($format, $nodePath) {
                  [
      Severity: Minor
      Found in src/Formatters/Plain.php - About 1 hr to fix

        Method formatMessage has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function formatMessage(int $indentLevel, string $mark, string $nodeName, $value): string
        {
            $stringifyComplexValue = fn($complexValue, $level) => implode(
                END_OF_LINE,
                [
        Severity: Minor
        Found in src/Formatters/Stylish.php - About 1 hr to fix
          Severity
          Category
          Status
          Source
          Language