Code Duplication    Length = 11-11 lines in 2 locations

lib/Field.php 1 location

@@ 130-140 (lines=11) @@
127
     *
128
     * @return string|$this current value if $t=UNDEFINED
129
     */
130
    public function caption($t = UNDEFINED)
131
    {
132
        if ($t === UNDEFINED && !$this->caption) {
133
            return ucwords(strtr(
134
                preg_replace('/_id$/', '', $this->short_name),
135
                '_',
136
                ' '
137
            ));
138
        }
139
140
        return $this->setterGetter('caption', $t);
141
    }
142
143
    /**

lib/Field/Base.php 1 location

@@ 127-137 (lines=11) @@
124
     *
125
     * @return string|$this current value if $t=UNDEFINED
126
     */
127
    public function caption($t = UNDEFINED)
128
    {
129
        if ($t === UNDEFINED && !$this->caption) {
130
            return ucwords(strtr(
131
                preg_replace('/_id$/', '', $this->short_name),
132
                '_',
133
                ' '
134
            ));
135
        }
136
137
        return $this->setterGetter('caption', $t);
138
    }
139
    /**
140
     * Sets field hint which will be used by forms.