Code Duplication    Length = 8-9 lines in 2 locations

core/db_models/fields/EE_Model_Field_Base.php 1 location

@@ 162-170 (lines=9) @@
159
     * @throws \EE_Error
160
     * @return string
161
     */
162
    public function get_name()
163
    {
164
        if ($this->_name) {
165
            return $this->_name;
166
        } else {
167
            throw new EE_Error(sprintf(__("Model field '%s' has no name set. Did you make a model and forget to call the parent model constructor?",
168
                "event_espresso"), get_class($this)));
169
        }
170
    }
171
172
    public function get_nicename()
173
    {

core/libraries/form_sections/base/EE_Form_Section_Base.form.php 1 location

@@ 329-336 (lines=8) @@
326
     * @throws EE_Error
327
     * @return string
328
     */
329
    public function name()
330
    {
331
        if (! $this->_construction_finalized) {
332
            throw new EE_Error(sprintf(__('You cannot use the form section\s name until _construct_finalize has been called on it (when we set the name). It was called on a form section of type \'s\'',
333
                'event_espresso'), get_class($this)));
334
        }
335
        return $this->_name;
336
    }
337
338
339