Code Duplication    Length = 7-7 lines in 2 locations

system/Inji/Model.php 2 locations

@@ 984-990 (lines=7) @@
981
            return $result->getArray($key);
982
        }
983
        $list = $result->getObjects(get_called_class(), $key);
984
        if (!empty($options['forSelect'])) {
985
            $return = [];
986
            foreach ($list as $key => $item) {
987
                $return[$key] = $item->name();
988
            }
989
            return $return;
990
        }
991
        return $list;
992
    }
993
@@ 1116-1122 (lines=7) @@
1113
                    return 0;
1114
                });
1115
            }
1116
            if (!empty($options['forSelect'])) {
1117
                $return = [];
1118
                foreach ($items as $key => $item) {
1119
                    $return[$key] = $item->name();
1120
                }
1121
                return $return;
1122
            }
1123
            return $items;
1124
        }
1125
        return [];