Code Duplication    Length = 8-8 lines in 2 locations

system/Inji/Model.php 2 locations

@@ 969-976 (lines=8) @@
966
        }
967
        static::$needJoin = [];
968
969
        foreach (static::$relJoins as $join) {
970
            foreach ($query->join as $item) {
971
                if ($item[0] === $join[0] && $item[3] === $join[3]) {
972
                    continue 2;
973
                }
974
            }
975
            $query->join($join);
976
        }
977
        static::$relJoins = [];
978
        if (!empty($options['limit'])) {
979
            $limit = (int) $options['limit'];
@@ 1321-1328 (lines=8) @@
1318
            }
1319
        }
1320
        static::$needJoin = [];
1321
        foreach (static::$relJoins as $join) {
1322
            foreach ($query->join as $item) {
1323
                if ($item[0] === $join[0] && $item[3] === $join[3]) {
1324
                    continue 2;
1325
                }
1326
            }
1327
            $query->join($join);
1328
        }
1329
        static::$relJoins = [];
1330
        $cols = 'COUNT(';
1331