Showing 54 of 56 total issues

Avoid too many return statements within this method.
Open

                return self::evaluateRelation($op, $left, $right);
Severity: Major
Found in src/Helpers/ComparisonLTR.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                        return new DictValue(Func::array_to_couples($inner));
    Severity: Major
    Found in src/Values/AbstractValue.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                      return $tmp === -1 || $tmp === 0;
      Severity: Major
      Found in src/Values/NumberValue.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                    return \null;
        Severity: Major
        Found in src/EnvInfo.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                              return new FuncValue(FnContainer::buildFromClosure($value));
          Severity: Major
          Found in src/Values/AbstractValue.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                            return new FuncValue(FnContainer::buildFromClosure($value));
            Severity: Major
            Found in src/Values/AbstractValue.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                      return \null;
              Severity: Major
              Found in src/Values/StringValue.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                        return $tempDir;
                Severity: Major
                Found in src/EnvInfo.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                          return [false, 0];
                  Severity: Major
                  Found in src/Repl.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                    return new ListValue($inner);
                    Severity: Major
                    Found in src/Values/AbstractValue.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                      return $l <= $r;
                      Severity: Major
                      Found in src/Values/StringValue.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                return \null;
                        Severity: Major
                        Found in src/Values/NumberValue.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                          return Interned::string($value);
                          Severity: Major
                          Found in src/Values/AbstractValue.php - About 30 mins to fix

                            Function evaluate has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring.
                            Open

                                public static function evaluate(
                                    string $op,
                                    AbstractValue $left,
                                    AbstractValue $right
                                ): AbstractValue {
                            Severity: Minor
                            Found in src/Helpers/ArithmeticLTR.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