Code Duplication    Length = 15-15 lines in 2 locations

src/PhpSpreadsheet/Calculation/Statistical.php 2 locations

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