Code Duplication    Length = 7-7 lines in 2 locations

system/Inji/Model.php 2 locations

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