Code Duplication    Length = 14-15 lines in 2 locations

src/PhpSpreadsheet/Calculation/Statistical.php 1 location

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

src/PhpSpreadsheet/Calculation/MathTrig.php 1 location

@@ 1377-1390 (lines=14) @@
1374
     *
1375
     * @return float
1376
     */
1377
    public static function SUMSQ(...$args)
1378
    {
1379
        $returnValue = 0;
1380
1381
        // Loop through arguments
1382
        foreach (Functions::flattenArray($args) as $arg) {
1383
            // Is it a numeric value?
1384
            if ((is_numeric($arg)) && (!is_string($arg))) {
1385
                $returnValue += ($arg * $arg);
1386
            }
1387
        }
1388
1389
        return $returnValue;
1390
    }
1391
1392
    /**
1393
     * SUMX2MY2.