Code Duplication    Length = 7-7 lines in 2 locations

system/Inji/Model.php 2 locations

@@ 788-794 (lines=7) @@
785
            return $result->getArray($key);
786
        }
787
        $list = $result->getObjects(get_called_class(), $key);
788
        if (!empty($options['forSelect'])) {
789
            $return = [];
790
            foreach ($list as $key => $item) {
791
                $return[$key] = $item->name();
792
            }
793
            return $return;
794
        }
795
        return $list;
796
    }
797
@@ 915-921 (lines=7) @@
912
                    return 0;
913
                });
914
            }
915
            if (!empty($options['forSelect'])) {
916
                $return = [];
917
                foreach ($items as $key => $item) {
918
                    $return[$key] = $item->name();
919
                }
920
                return $return;
921
            }
922
            return $items;
923
        }
924
        return [];