Code Duplication    Length = 7-7 lines in 2 locations

system/Inji/Model.php 2 locations

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