Code Duplication    Length = 8-8 lines in 2 locations

class/utility.php 2 locations

@@ 154-161 (lines=8) @@
151
                if ('' !== $value >= $lengthcheck) {
152
                    return null;
153
                }
154
                if (ctype_digit($value)) {
155
                    $value = (int)$value;
156
                } else {
157
                    if ($strict === true) {
158
                        $value = preg_replace('/\W/', '', trim($value));
159
                    }
160
                    $value = strtolower((string)$value);
161
                }
162
                $globals[$k] = $value;
163
            }
164
@@ 172-179 (lines=8) @@
169
        }
170
171
        $value = strip_tags(trim($array[$name]));
172
        if (ctype_digit($value)) {
173
            $value = (int)$value;
174
        } else {
175
            if ($strict === true) {
176
                $value = preg_replace('/\W/', '', trim($value));
177
            }
178
            $value = strtolower((string)$value);
179
        }
180
181
        return $value;
182
    }