Code Duplication    Length = 8-8 lines in 2 locations

system/Inji/Model.php 2 locations

@@ 1016-1023 (lines=8) @@
1013
        }
1014
        static::$needJoin = [];
1015
1016
        foreach (static::$relJoins as $join) {
1017
            foreach ($query->join as $item) {
1018
                if ($item[0] === $join[0] && $item[3] === $join[3]) {
1019
                    continue 2;
1020
                }
1021
            }
1022
            $query->join($join);
1023
        }
1024
        static::$relJoins = [];
1025
        if (!empty($options['limit'])) {
1026
            $limit = (int)$options['limit'];
@@ 1174-1181 (lines=8) @@
1171
            }
1172
        }
1173
        static::$needJoin = [];
1174
        foreach (static::$relJoins as $join) {
1175
            foreach ($query->join as $item) {
1176
                if ($item[0] === $join[0] && $item[3] === $join[3]) {
1177
                    continue 2;
1178
                }
1179
            }
1180
            $query->join($join);
1181
        }
1182
        static::$relJoins = [];
1183
        $cols = 'COUNT(';
1184