Code Duplication    Length = 12-12 lines in 2 locations

src/PhpSpreadsheet/Calculation/MathTrig.php 1 location

@@ 1072-1083 (lines=12) @@
1069
     * @param    float    $number        Number
1070
     * @return    float    Square Root of Number * Pi
1071
     */
1072
    public static function SQRTPI($number)
1073
    {
1074
        $number = Functions::flattenSingleValue($number);
1075
1076
        if (is_numeric($number)) {
1077
            if ($number < 0) {
1078
                return Functions::NAN();
1079
            }
1080
1081
            return sqrt($number * M_PI);
1082
        }
1083
1084
        return Functions::VALUE();
1085
    }
1086

src/PhpSpreadsheet/Calculation/Statistical.php 1 location

@@ 1704-1715 (lines=12) @@
1701
     * @param    float        $value
1702
     * @return    float
1703
     */
1704
    public static function GAMMALN($value)
1705
    {
1706
        $value = Functions::flattenSingleValue($value);
1707
1708
        if (is_numeric($value)) {
1709
            if ($value <= 0) {
1710
                return Functions::NAN();
1711
            }
1712
1713
            return log(self::gamma($value));
1714
        }
1715
1716
        return Functions::VALUE();
1717
    }
1718