Code Duplication    Length = 10-10 lines in 2 locations

main/inc/lib/extra_field_option.lib.php 1 location

@@ 764-773 (lines=10) @@
761
     * @param bool $translateDisplayText Optional
762
     * @return array
763
     */
764
    public function get($id, $translateDisplayText = true)
765
    {
766
        $info = parent::get($id);
767
768
        if ($translateDisplayText) {
769
            $info['display_text'] = self::translateDisplayName($info['display_text']);
770
        }
771
772
        return $info;
773
    }
774
775
    /**
776
     * Translate the display text for a extra field option

main/inc/lib/extra_field.lib.php 1 location

@@ 2794-2803 (lines=10) @@
2791
     * @param bool $translateDisplayText Optional
2792
     * @return array
2793
     */
2794
    public function get($id, $translateDisplayText = true)
2795
    {
2796
        $info = parent::get($id);
2797
2798
        if ($translateDisplayText) {
2799
            $info['display_text'] = self::translateDisplayName($info['variable'], $info['display_text']);
2800
        }
2801
2802
        return $info;
2803
    }
2804
2805
    /**
2806
     * Translate the display text for a extra field