src/Solving/ComplexEvaluator.php
Method visitFunctionNode
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function visitFunctionNode(FunctionNode $node): Complex
{
if ($node->operand === null) {
throw new NullOperandException();
}
Avoid too many return
statements within this method. Open
Open
return Complex::sinh($z);
Avoid too many return
statements within this method. Open
Open
return Complex::div(Complex::log($z), M_LN10);
Avoid too many return
statements within this method. Open
Open
return Complex::sqrt($z);
Avoid too many return
statements within this method. Open
Open
return new Complex($z->arg(), 0);
Avoid too many return
statements within this method. Open
Open
return Complex::arccos($z);
Avoid too many return
statements within this method. Open
Open
return Complex::tanh($z);
Avoid too many return
statements within this method. Open
Open
return Complex::log($z);
Avoid too many return
statements within this method. Open
Open
return Complex::arctan($z);
Avoid too many return
statements within this method. Open
Open
return Complex::div(1, Complex::tanh($z));
Avoid too many return
statements within this method. Open
Open
return Complex::arcosh($z);
Avoid too many return
statements within this method. Open
Open
return new Complex($z->real, -$z->imaginary);
Avoid too many return
statements within this method. Open
Open
return Complex::arccot($z);
Avoid too many return
statements within this method. Open
Open
return Complex::div($left->accept($this), $right->accept($this));
Avoid too many return
statements within this method. Open
Open
return Complex::div(1, Complex::artanh($z));
Avoid too many return
statements within this method. Open
Open
return new Complex($z->real, 0);
Avoid too many return
statements within this method. Open
Open
return Complex::artanh($z);
Avoid too many return
statements within this method. Open
Open
return Complex::cosh($z);
Avoid too many return
statements within this method. Open
Open
return Complex::log($z);
Avoid too many return
statements within this method. Open
Open
return Complex::arsinh($z);
Avoid too many return
statements within this method. Open
Open
return new Complex($z->abs(), 0);
Avoid too many return
statements within this method. Open
Open
return new Complex($z->imaginary, 0);
Avoid too many return
statements within this method. Open
Open
return Complex::pow($left->accept($this), $right->accept($this));
Avoid too many return
statements within this method. Open
Open
return Complex::arcsin($z);
Avoid too many return
statements within this method. Open
Open
return Complex::exp($z);