Code Duplication    Length = 14-14 lines in 2 locations

src/PhpSpreadsheet/Calculation/MathTrig.php 1 location

@@ 1111-1124 (lines=14) @@
1108
     *
1109
     * @return float Square Root of Number * Pi
1110
     */
1111
    public static function SQRTPI($number)
1112
    {
1113
        $number = Functions::flattenSingleValue($number);
1114
1115
        if (is_numeric($number)) {
1116
            if ($number < 0) {
1117
                return Functions::NAN();
1118
            }
1119
1120
            return sqrt($number * M_PI);
1121
        }
1122
1123
        return Functions::VALUE();
1124
    }
1125
1126
    /**
1127
     * SUBTOTAL.

src/PhpSpreadsheet/Calculation/Statistical.php 1 location

@@ 1763-1776 (lines=14) @@
1760
     *
1761
     * @return float
1762
     */
1763
    public static function GAMMALN($value)
1764
    {
1765
        $value = Functions::flattenSingleValue($value);
1766
1767
        if (is_numeric($value)) {
1768
            if ($value <= 0) {
1769
                return Functions::NAN();
1770
            }
1771
1772
            return log(self::gamma($value));
1773
        }
1774
1775
        return Functions::VALUE();
1776
    }
1777
1778
    /**
1779
     * GEOMEAN.