Code Duplication    Length = 3-4 lines in 2 locations

src/PhpSpreadsheet/Calculation/LookupRef.php 2 locations

@@ 516-518 (lines=3) @@
513
        $lookupValue = strtolower($lookupValue);
514
515
        // Lookup_value type has to be number, text, or logical values
516
        if ((!is_numeric($lookupValue)) && (!is_string($lookupValue)) && (!is_bool($lookupValue))) {
517
            return Functions::NA();
518
        }
519
520
        // Match_type is 0, 1 or -1
521
        if (($matchType !== 0) && ($matchType !== -1) && ($matchType !== 1)) {
@@ 534-537 (lines=4) @@
531
        // Lookup_array should contain only number, text, or logical values, or empty (null) cells
532
        foreach ($lookupArray as $i => $lookupArrayValue) {
533
            //    check the type of the value
534
            if ((!is_numeric($lookupArrayValue)) && (!is_string($lookupArrayValue)) &&
535
                (!is_bool($lookupArrayValue)) && (!is_null($lookupArrayValue))
536
            ) {
537
                return Functions::NA();
538
            }
539
            // Convert strings to lowercase for case-insensitive testing
540
            if (is_string($lookupArrayValue)) {