Code Duplication    Length = 9-9 lines in 2 locations

src/RandomArray.php 1 location

@@ 299-307 (lines=9) @@
296
        if ($lim_elements) {
297
            $this->lim_elements = $lim_elements;
298
        }
299
        if ($lim_depth<1
300
            || $this->lim_elements < 0
301
            || $this->max_arr_key < 0
302
            || $this->max_arr_key < $this->min_arr_key
303
            || $this->max_arr_val < 0
304
            || $this->max_arr_val < $this->min_arr_val
305
        ) {
306
            return false;
307
        }
308
309
        $elem_cnt = mt_rand($min_elem_cnt, $max_elem_cnt);
310
        if ($elem_cnt > $this->lim_elements) {

src/RandomToFile.php 1 location

@@ 142-150 (lines=9) @@
139
        if ($lim_elements) {
140
            $this->lim_elements = $lim_elements;
141
        }
142
        if ($lim_depth < 1
143
            || $this->lim_elements < 0
144
            || $this->max_arr_key < 0
145
            || $this->max_arr_key < $this->min_arr_key
146
            || $this->max_arr_val < 0
147
            || $this->max_arr_val < $this->min_arr_val
148
        ) {
149
            return false;
150
        }
151
        
152
        if (!$oh = $fh = $this->file_handler) {
153
            $this->openOutputFile();