Code Duplication    Length = 12-12 lines in 2 locations

src/PhpSpreadsheet/Calculation/Functions.php 2 locations

@@ 408-419 (lines=12) @@
405
     *
406
     * @return string|bool
407
     */
408
    public static function isEven($value = null)
409
    {
410
        $value = self::flattenSingleValue($value);
411
412
        if ($value === null) {
413
            return self::NAME();
414
        } elseif ((is_bool($value)) || ((is_string($value)) && (!is_numeric($value)))) {
415
            return self::VALUE();
416
        }
417
418
        return $value % 2 == 0;
419
    }
420
421
    /**
422
     * IS_ODD.
@@ 428-439 (lines=12) @@
425
     *
426
     * @return string|bool
427
     */
428
    public static function isOdd($value = null)
429
    {
430
        $value = self::flattenSingleValue($value);
431
432
        if ($value === null) {
433
            return self::NAME();
434
        } elseif ((is_bool($value)) || ((is_string($value)) && (!is_numeric($value)))) {
435
            return self::VALUE();
436
        }
437
438
        return abs($value) % 2 == 1;
439
    }
440
441
    /**
442
     * IS_NUMBER.