Code Duplication    Length = 7-7 lines in 2 locations

system/Inji/Model.php 2 locations

@@ 992-998 (lines=7) @@
989
            return $result->getArray($key);
990
        }
991
        $list = $result->getObjects(get_called_class(), $key);
992
        if (!empty($options['forSelect'])) {
993
            $return = [];
994
            foreach ($list as $key => $item) {
995
                $return[$key] = $item->name();
996
            }
997
            return $return;
998
        }
999
        return $list;
1000
    }
1001
@@ 1124-1130 (lines=7) @@
1121
                    return 0;
1122
                });
1123
            }
1124
            if (!empty($options['forSelect'])) {
1125
                $return = [];
1126
                foreach ($items as $key => $item) {
1127
                    $return[$key] = $item->name();
1128
                }
1129
                return $return;
1130
            }
1131
            return $items;
1132
        }
1133
        return [];