Code Duplication    Length = 14-14 lines in 2 locations

src/PhpSpreadsheet/Calculation/Engineering.php 2 locations

@@ 2078-2091 (lines=14) @@
2075
     *
2076
     * @return string
2077
     */
2078
    public static function IMLOG10($complexNumber)
2079
    {
2080
        $complexNumber = Functions::flattenSingleValue($complexNumber);
2081
2082
        $parsedComplex = self::parseComplex($complexNumber);
2083
2084
        if (($parsedComplex['real'] == 0.0) && ($parsedComplex['imaginary'] == 0.0)) {
2085
            return Functions::NAN();
2086
        } elseif (($parsedComplex['real'] > 0.0) && ($parsedComplex['imaginary'] == 0.0)) {
2087
            return log10($parsedComplex['real']);
2088
        }
2089
2090
        return self::IMPRODUCT(log10(self::EULER), self::IMLN($complexNumber));
2091
    }
2092
2093
    /**
2094
     * IMLOG2.
@@ 2105-2118 (lines=14) @@
2102
     *
2103
     * @return string
2104
     */
2105
    public static function IMLOG2($complexNumber)
2106
    {
2107
        $complexNumber = Functions::flattenSingleValue($complexNumber);
2108
2109
        $parsedComplex = self::parseComplex($complexNumber);
2110
2111
        if (($parsedComplex['real'] == 0.0) && ($parsedComplex['imaginary'] == 0.0)) {
2112
            return Functions::NAN();
2113
        } elseif (($parsedComplex['real'] > 0.0) && ($parsedComplex['imaginary'] == 0.0)) {
2114
            return log($parsedComplex['real'], 2);
2115
        }
2116
2117
        return self::IMPRODUCT(log(self::EULER, 2), self::IMLN($complexNumber));
2118
    }
2119
2120
    /**
2121
     * IMEXP.