Code Duplication    Length = 15-15 lines in 2 locations

src/PhpSpreadsheet/Calculation/Statistical.php 2 locations

@@ 1210-1224 (lines=15) @@
1207
     * @param    mixed        $arg,...        Data values
1208
     * @return    int
1209
     */
1210
    public static function COUNTA()
1211
    {
1212
        $returnValue = 0;
1213
1214
        // Loop through arguments
1215
        $aArgs = Functions::flattenArray(func_get_args());
1216
        foreach ($aArgs as $arg) {
1217
            // Is it a numeric, boolean or string value?
1218
            if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) && ($arg != '')))) {
1219
                ++$returnValue;
1220
            }
1221
        }
1222
1223
        return $returnValue;
1224
    }
1225
1226
    /**
1227
     * COUNTBLANK
@@ 1238-1252 (lines=15) @@
1235
     * @param    mixed        $arg,...        Data values
1236
     * @return    int
1237
     */
1238
    public static function COUNTBLANK()
1239
    {
1240
        $returnValue = 0;
1241
1242
        // Loop through arguments
1243
        $aArgs = Functions::flattenArray(func_get_args());
1244
        foreach ($aArgs as $arg) {
1245
            // Is it a blank cell?
1246
            if ((is_null($arg)) || ((is_string($arg)) && ($arg == ''))) {
1247
                ++$returnValue;
1248
            }
1249
        }
1250
1251
        return $returnValue;
1252
    }
1253
1254
    /**
1255
     * COUNTIF