Code Duplication    Length = 14-15 lines in 2 locations

src/PhpSpreadsheet/Calculation/MathTrig.php 1 location

@@ 1354-1367 (lines=14) @@
1351
     *
1352
     * @return float
1353
     */
1354
    public static function SUMSQ(...$args)
1355
    {
1356
        $returnValue = 0;
1357
1358
        // Loop through arguments
1359
        foreach (Functions::flattenArray($args) as $arg) {
1360
            // Is it a numeric value?
1361
            if ((is_numeric($arg)) && (!is_string($arg))) {
1362
                $returnValue += ($arg * $arg);
1363
            }
1364
        }
1365
1366
        return $returnValue;
1367
    }
1368
1369
    /**
1370
     * SUMX2MY2.

src/PhpSpreadsheet/Calculation/Statistical.php 1 location

@@ 1280-1294 (lines=15) @@
1277
     *
1278
     * @return int
1279
     */
1280
    public static function COUNTBLANK(...$args)
1281
    {
1282
        $returnValue = 0;
1283
1284
        // Loop through arguments
1285
        $aArgs = Functions::flattenArray($args);
1286
        foreach ($aArgs as $arg) {
1287
            // Is it a blank cell?
1288
            if ((is_null($arg)) || ((is_string($arg)) && ($arg == ''))) {
1289
                ++$returnValue;
1290
            }
1291
        }
1292
1293
        return $returnValue;
1294
    }
1295
1296
    /**
1297
     * COUNTIF.