Code Duplication    Length = 10-10 lines in 2 locations

src/helper/Validate.php 2 locations

@@ 185-194 (lines=10) @@
182
    }
183
}
184
185
if (! function_exists('length_between')) {
186
    function length_between($value, array $args)
187
    {
188
        if (!is_valid_type_for_length($value)) {
189
            throw new InvalidTypeParameter('Invalid parameter type');
190
        }
191
192
        return get_length($value) < $args[Field::VAR_UPPER_LIMIT] && get_length($value) > $args[Field::VAR_LOWER_LIMIT];
193
    }
194
}
195
196
197
if (! function_exists('length_between_or_equal')) {
@@ 197-206 (lines=10) @@
194
}
195
196
197
if (! function_exists('length_between_or_equal')) {
198
    function length_between_or_equal($value, array $args)
199
    {
200
        if (!is_valid_type_for_length($value)) {
201
            throw new InvalidTypeParameter('Invalid parameter type');
202
        }
203
204
        return get_length($value) <= $args[Field::VAR_UPPER_LIMIT] && get_length($value) >= $args[Field::VAR_LOWER_LIMIT];
205
    }
206
}
207