src/Json/Json5/Ast/StringNode.php

Summary

Maintainability
B
6 hrs
Test Coverage

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

    private function render(TokenInterface $token, Readable $sources): string
    {
        switch ($token->getName()) {
            case 'T_CHAR_UTF':
                return $this->renderUtfChar($token->getValue(1));
Severity: Minor
Found in src/Json/Json5/Ast/StringNode.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

                    return "\u{0000}";
    Severity: Major
    Found in src/Json/Json5/Ast/StringNode.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                      return "\u{000D}";
      Severity: Major
      Found in src/Json/Json5/Ast/StringNode.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                        return "\u{000B}";
        Severity: Major
        Found in src/Json/Json5/Ast/StringNode.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                          return $token->getValue(1);
          Severity: Major
          Found in src/Json/Json5/Ast/StringNode.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                            return "\u{0008}";
            Severity: Major
            Found in src/Json/Json5/Ast/StringNode.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                              return '\\';
              Severity: Major
              Found in src/Json/Json5/Ast/StringNode.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                                return "'";
                Severity: Major
                Found in src/Json/Json5/Ast/StringNode.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                  return "\u{0009}";
                  Severity: Major
                  Found in src/Json/Json5/Ast/StringNode.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                    return '"';
                    Severity: Major
                    Found in src/Json/Json5/Ast/StringNode.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                      return "\u{000C}";
                      Severity: Major
                      Found in src/Json/Json5/Ast/StringNode.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                        return $this->unpack($token, $sources);
                        Severity: Major
                        Found in src/Json/Json5/Ast/StringNode.php - About 30 mins to fix

                          There are no issues that match your filters.

                          Category
                          Status