Code Duplication    Length = 8-8 lines in 2 locations

class/utility.php 2 locations

@@ 2009-2016 (lines=8) @@
2006
                if (strlen($value >= $lengthcheck)) {
2007
                    return null;
2008
                }
2009
                if (ctype_digit($value)) {
2010
                    $value = (int)$value;
2011
                } else {
2012
                    if (true === $strict) {
2013
                        $value = preg_replace('/\W/', '', trim($value));
2014
                    }
2015
                    $value = strtolower((string)$value);
2016
                }
2017
                $globals[$k] = $value;
2018
            }
2019
@@ 2027-2034 (lines=8) @@
2024
        } else {
2025
            $value = strip_tags(trim($array[$name]));
2026
        }
2027
        if (ctype_digit($value)) {
2028
            $value = (int)$value;
2029
        } else {
2030
            if (true === $strict) {
2031
                $value = preg_replace('/\W/', '', trim($value));
2032
            }
2033
            $value = strtolower((string)$value);
2034
        }
2035
2036
        return $value;
2037
    }