mossadal/math-parser

View on GitHub
src/MathParser/Interpreting/ComplexEvaluator.php

Summary

Maintainability
D
1 day
Test Coverage

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

    public function visitFunctionNode(FunctionNode $node)
    {
        $z = $node->getOperand()->accept($this);
        $a = $z->r();
        $b = $z->i();
Severity: Major
Found in src/MathParser/Interpreting/ComplexEvaluator.php - About 2 hrs to fix

    Avoid too many return statements within this method.
    Open

                    return Complex::arcosh($z);
    Severity: Major
    Found in src/MathParser/Interpreting/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/MathParser/Interpreting/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/MathParser/Interpreting/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/MathParser/Interpreting/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/MathParser/Interpreting/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/MathParser/Interpreting/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/MathParser/Interpreting/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/MathParser/Interpreting/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/MathParser/Interpreting/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/MathParser/Interpreting/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/MathParser/Interpreting/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/MathParser/Interpreting/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/MathParser/Interpreting/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/MathParser/Interpreting/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/MathParser/Interpreting/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/MathParser/Interpreting/ComplexEvaluator.php - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                                    return new Complex($z->i(), 0);
                                    Severity: Major
                                    Found in src/MathParser/Interpreting/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/MathParser/Interpreting/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/MathParser/Interpreting/ComplexEvaluator.php - About 30 mins to fix

                                          Avoid too many return statements within this method.
                                          Open

                                                          return Complex::div($a, $b);
                                          Severity: Major
                                          Found in src/MathParser/Interpreting/ComplexEvaluator.php - About 30 mins to fix

                                            Avoid too many return statements within this method.
                                            Open

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

                                              Avoid too many return statements within this method.
                                              Open

                                                              return Complex::pow($a, $b);
                                              Severity: Major
                                              Found in src/MathParser/Interpreting/ComplexEvaluator.php - About 30 mins to fix

                                                Avoid too many return statements within this method.
                                                Open

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

                                                  Avoid too many return statements within this method.
                                                  Open

                                                                  return new Complex($z->r(), -$z->i());
                                                  Severity: Major
                                                  Found in src/MathParser/Interpreting/ComplexEvaluator.php - About 30 mins to fix

                                                    There are no issues that match your filters.

                                                    Category
                                                    Status