Code Duplication    Length = 3-5 lines in 2 locations

src/Scopes/WhereScope.php 2 locations

@@ 40-44 (lines=5) @@
37
38
        $newArr = [];
39
        foreach ($wheres as $key => $where) {
40
            if (method_exists($this , "iterateOn" . $where['type'])) {
41
                $newArr[] = $this->{"iterateOn" . $where['type']}($where , $translatableColumns , $locale);
42
            } else {
43
                $newArr[] = $where;
44
            }
45
        }
46
47
        if (!empty($newArr)) {
@@ 85-87 (lines=3) @@
82
        $newNestedArr = [];
83
        foreach ($nestedWheres as $nestedWhere) {
84
85
            if (method_exists($this , "iterateOn" . $nestedWhere['type'])) {
86
                $newNestedArr [] = $this->{"iterateOn" . $nestedWhere['type']}($nestedWhere , $translatableColumns , $locale);
87
            }
88
        }
89
90
        $nestedQuery->wheres = $newNestedArr;