Code Duplication    Length = 5-7 lines in 3 locations

micro/validator/FileValidator.php 3 locations

@@ 35-41 (lines=7) @@
32
                    return false;
33
                }
34
                foreach ($files->files AS $fContext) {
35
                    if (!empty($this->params['types']) && (strpos($this->params['types'],
36
                                $fContext['type']) === false)
37
                    ) {
38
                        $this->errors[] = 'File ' . $fContext['name'] . ' not allowed type';
39
40
                        return false;
41
                    }
42
                    if (!empty($this->params['minSize']) && ($fContext['size'] < $this->params['minSize'])) {
43
                        $this->errors[] = 'File ' . $fContext['name'] . ' too small size';
44
@@ 42-46 (lines=5) @@
39
40
                        return false;
41
                    }
42
                    if (!empty($this->params['minSize']) && ($fContext['size'] < $this->params['minSize'])) {
43
                        $this->errors[] = 'File ' . $fContext['name'] . ' too small size';
44
45
                        return false;
46
                    }
47
                    if (!empty($this->params['maxSize']) && ($fContext['type'] > $this->params['maxSize'])) {
48
                        $this->errors[] = 'File ' . $fContext['name'] . ' too many size';
49
@@ 47-51 (lines=5) @@
44
45
                        return false;
46
                    }
47
                    if (!empty($this->params['maxSize']) && ($fContext['type'] > $this->params['maxSize'])) {
48
                        $this->errors[] = 'File ' . $fContext['name'] . ' too many size';
49
50
                        return false;
51
                    }
52
                }
53
            }
54
        }