Code Duplication    Length = 7-7 lines in 2 locations

system/Inji/Model.php 2 locations

@@ 1000-1006 (lines=7) @@
997
            return $result->getArray($key);
998
        }
999
        $list = $result->getObjects(get_called_class(), $key);
1000
        if (!empty($options['forSelect'])) {
1001
            $return = [];
1002
            foreach ($list as $key => $item) {
1003
                $return[$key] = $item->name();
1004
            }
1005
            return $return;
1006
        }
1007
        return $list;
1008
    }
1009
@@ 1132-1138 (lines=7) @@
1129
                    return 0;
1130
                });
1131
            }
1132
            if (!empty($options['forSelect'])) {
1133
                $return = [];
1134
                foreach ($items as $key => $item) {
1135
                    $return[$key] = $item->name();
1136
                }
1137
                return $return;
1138
            }
1139
            return $items;
1140
        }
1141
        return [];