j84reginato/my-eval

View on GitHub
src/Solving/ComplexEvaluator.php

Summary

Maintainability
D
1 day
Test Coverage

Method visitFunctionNode has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function visitFunctionNode(FunctionNode $node): Complex
    {
        if ($node->operand === null) {
            throw new NullOperandException();
        }
Severity: Major
Found in src/Solving/ComplexEvaluator.php - About 2 hrs to fix

    Avoid too many return statements within this method.
    Open

                    return Complex::sinh($z);
    Severity: Major
    Found in src/Solving/ComplexEvaluator.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                      return Complex::div(Complex::log($z), M_LN10);
      Severity: Major
      Found in src/Solving/ComplexEvaluator.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                        return Complex::sqrt($z);
        Severity: Major
        Found in src/Solving/ComplexEvaluator.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                          return new Complex($z->arg(), 0);
          Severity: Major
          Found in src/Solving/ComplexEvaluator.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                            return Complex::arccos($z);
            Severity: Major
            Found in src/Solving/ComplexEvaluator.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                              return Complex::tanh($z);
              Severity: Major
              Found in src/Solving/ComplexEvaluator.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                                return Complex::log($z);
                Severity: Major
                Found in src/Solving/ComplexEvaluator.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                  return Complex::arctan($z);
                  Severity: Major
                  Found in src/Solving/ComplexEvaluator.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                    return Complex::div(1, Complex::tanh($z));
                    Severity: Major
                    Found in src/Solving/ComplexEvaluator.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                      return Complex::arcosh($z);
                      Severity: Major
                      Found in src/Solving/ComplexEvaluator.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                        return new Complex($z->real, -$z->imaginary);
                        Severity: Major
                        Found in src/Solving/ComplexEvaluator.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                          return Complex::arccot($z);
                          Severity: Major
                          Found in src/Solving/ComplexEvaluator.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                            return Complex::div($left->accept($this), $right->accept($this));
                            Severity: Major
                            Found in src/Solving/ComplexEvaluator.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                              return Complex::div(1, Complex::artanh($z));
                              Severity: Major
                              Found in src/Solving/ComplexEvaluator.php - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                                return new Complex($z->real, 0);
                                Severity: Major
                                Found in src/Solving/ComplexEvaluator.php - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                                  return Complex::artanh($z);
                                  Severity: Major
                                  Found in src/Solving/ComplexEvaluator.php - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                                    return Complex::cosh($z);
                                    Severity: Major
                                    Found in src/Solving/ComplexEvaluator.php - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                                      return Complex::log($z);
                                      Severity: Major
                                      Found in src/Solving/ComplexEvaluator.php - About 30 mins to fix

                                        Avoid too many return statements within this method.
                                        Open

                                                        return Complex::arsinh($z);
                                        Severity: Major
                                        Found in src/Solving/ComplexEvaluator.php - About 30 mins to fix

                                          Avoid too many return statements within this method.
                                          Open

                                                          return new Complex($z->abs(), 0);
                                          Severity: Major
                                          Found in src/Solving/ComplexEvaluator.php - About 30 mins to fix

                                            Avoid too many return statements within this method.
                                            Open

                                                            return new Complex($z->imaginary, 0);
                                            Severity: Major
                                            Found in src/Solving/ComplexEvaluator.php - About 30 mins to fix

                                              Avoid too many return statements within this method.
                                              Open

                                                              return Complex::pow($left->accept($this), $right->accept($this));
                                              Severity: Major
                                              Found in src/Solving/ComplexEvaluator.php - About 30 mins to fix

                                                Avoid too many return statements within this method.
                                                Open

                                                                return Complex::arcsin($z);
                                                Severity: Major
                                                Found in src/Solving/ComplexEvaluator.php - About 30 mins to fix

                                                  Avoid too many return statements within this method.
                                                  Open

                                                                  return Complex::exp($z);
                                                  Severity: Major
                                                  Found in src/Solving/ComplexEvaluator.php - About 30 mins to fix

                                                    There are no issues that match your filters.

                                                    Category
                                                    Status