Code Duplication    Length = 16-18 lines in 2 locations

src/PhpSpreadsheet/Calculation/Engineering.php 2 locations

@@ 1952-1969 (lines=18) @@
1949
     *
1950
     * @return float|string
1951
     */
1952
    public static function IMCOS($complexNumber)
1953
    {
1954
        $complexNumber = Functions::flattenSingleValue($complexNumber);
1955
1956
        $parsedComplex = self::parseComplex($complexNumber);
1957
1958
        if ($parsedComplex['imaginary'] == 0.0) {
1959
            return cos($parsedComplex['real']);
1960
        }
1961
1962
        return self::IMCONJUGATE(
1963
            self::COMPLEX(
1964
                cos($parsedComplex['real']) * cosh($parsedComplex['imaginary']),
1965
                sin($parsedComplex['real']) * sinh($parsedComplex['imaginary']),
1966
                $parsedComplex['suffix']
1967
            )
1968
        );
1969
    }
1970
1971
    /**
1972
     * IMSIN.
@@ 1983-1998 (lines=16) @@
1980
     *
1981
     * @return float|string
1982
     */
1983
    public static function IMSIN($complexNumber)
1984
    {
1985
        $complexNumber = Functions::flattenSingleValue($complexNumber);
1986
1987
        $parsedComplex = self::parseComplex($complexNumber);
1988
1989
        if ($parsedComplex['imaginary'] == 0.0) {
1990
            return sin($parsedComplex['real']);
1991
        }
1992
1993
        return self::COMPLEX(
1994
            sin($parsedComplex['real']) * cosh($parsedComplex['imaginary']),
1995
            cos($parsedComplex['real']) * sinh($parsedComplex['imaginary']),
1996
            $parsedComplex['suffix']
1997
        );
1998
    }
1999
2000
    /**
2001
     * IMSQRT.