Showing 68 of 82 total issues

Avoid too many return statements within this method.
Open

        return $otherwise($reflection);
Severity: Major
Found in src/Foundation/Webonyx/Builder/ScalarBuilder.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

      Avoid too many return statements within this method.
      Open

                      return false;
      Severity: Major
      Found in src/SDL/Reflection/Builder/Invocations/ValueBuilder.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 $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 Carbon::createFromTimestamp($value);
            Severity: Major
            Found in src/Foundation/Webonyx/Builder/ScalarBuilder.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 Type::float();
                Severity: Major
                Found in src/Foundation/Webonyx/Builder/ScalarBuilder.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                  return $this->createDateTime($reflection);
                  Severity: Major
                  Found in src/Foundation/Webonyx/Builder/ScalarBuilder.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                            return (float)$value->getValue();
                    Severity: Major
                    Found in src/GraphQL/AST/Value/NumberValue.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_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 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 "'";
                            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 \get_class($value);
                                Severity: Major
                                Found in src/Dumper/Resolver/CallableResolver.php - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                                      return Carbon::instance($value);
                                  Severity: Major
                                  Found in src/Foundation/Webonyx/Builder/ScalarBuilder.php - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                            return $this->toString($ast);
                                    Severity: Major
                                    Found in src/SDL/Reflection/Builder/Invocations/ValueBuilder.php - About 30 mins to fix

                                      Function singular has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                          private function singular(iterable $routes, FieldResolve $event)
                                          {
                                              foreach ($routes as $route) {
                                                  $before = $this->fireDispatch($route, $event);
                                      
                                      
                                      Severity: Minor
                                      Found in src/Extension/Routing/Subscribers/FieldResolveToActionSubscriber.php - About 25 mins to fix

                                      Cognitive Complexity

                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                      A method's cognitive complexity is based on a few simple rules:

                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                      • Code is considered more complex for each "break in the linear flow of the code"
                                      • Code is considered more complex when "flow breaking structures are nested"

                                      Further reading

                                      Function buildInputFields has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                          private function buildInputFields(InputDefinition $input): array
                                          {
                                              $result = [];
                                      
                                              foreach ($input->getArguments() as $field) {
                                      Severity: Minor
                                      Found in src/Foundation/Webonyx/Builder/InputBuilder.php - About 25 mins to fix

                                      Cognitive Complexity

                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                      A method's cognitive complexity is based on a few simple rules:

                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                      • Code is considered more complex for each "break in the linear flow of the code"
                                      • Code is considered more complex when "flow breaking structures are nested"

                                      Further reading

                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language