Code Duplication    Length = 5-5 lines in 2 locations

src/PhpSpreadsheet/Calculation/Engineering.php 2 locations

@@ 862-866 (lines=5) @@
859
                $fResult = $fTerm = pow($x / 2, $ord) / MathTrig::FACT($ord);
860
                $ordK = 1;
861
                $fSqrX = ($x * $x) / 4;
862
                do {
863
                    $fTerm *= $fSqrX;
864
                    $fTerm /= ($ordK * ($ordK + $ord));
865
                    $fResult += $fTerm;
866
                } while ((abs($fTerm) > 1e-12) && (++$ordK < 100));
867
            } else {
868
                $f_2_PI = 2 * M_PI;
869
@@ 917-921 (lines=5) @@
914
                $fResult = $fTerm = pow($x / 2, $ord) / MathTrig::FACT($ord);
915
                $ordK = 1;
916
                $fSqrX = ($x * $x) / -4;
917
                do {
918
                    $fTerm *= $fSqrX;
919
                    $fTerm /= ($ordK * ($ordK + $ord));
920
                    $fResult += $fTerm;
921
                } while ((abs($fTerm) > 1e-12) && (++$ordK < 100));
922
            } else {
923
                $f_PI_DIV_2 = M_PI / 2;
924
                $f_PI_DIV_4 = M_PI / 4;