Showing 20 of 20 total issues

Method createGrammarRules has 76 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function createGrammarRules(): array
    {
        return [
            new Concatenation(0, ['Value'], null),
            (new Concatenation('Json', [0], 'Json'))->setDefaultId('Json'),
Severity: Major
Found in src/Json/Json5/BaseParser.php - About 3 hrs to fix

    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 self::ERROR_MESSAGE_RECURSION;
        Severity: Major
        Found in src/Json/Exception/Message.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                          return self::ERROR_MESSAGE_INF_OR_NAN;
          Severity: Major
          Found in src/Json/Exception/Message.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 self::ERROR_MESSAGE_UNKNOWN;
                Severity: Major
                Found in src/Json/Exception/Message.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                  return self::ERROR_MESSAGE_UNSUPPORTED_TYPE;
                  Severity: Major
                  Found in src/Json/Exception/Message.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 self::ERROR_MESSAGE_UTF8;
                            Severity: Major
                            Found in src/Json/Exception/Message.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                              return self::ERROR_MESSAGE_UTF16;
                              Severity: Major
                              Found in src/Json/Exception/Message.php - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                                return self::ERROR_MESSAGE_INVALID_PROPERTY_NAME;
                                Severity: Major
                                Found in src/Json/Exception/Message.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
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language