Code Duplication    Length = 17-18 lines in 2 locations

core/domain/services/registration/form/v1/RegFormInputHandler.php 1 location

@@ 78-94 (lines=17) @@
75
            $form_input,
76
            $input_value
77
        );
78
        if (! $this->saveRegistrationFormInput($registration, $reg_url_link, $form_input, $input_value)) {
79
            EE_Error::add_error(
80
                sprintf(
81
                    esc_html_x(
82
                        'Unable to save registration form data for the form input: "%1$s" with the submitted value: "%2$s"',
83
                        'Unable to save registration form data for the form input: "form input name" with the submitted value: "form input value"',
84
                        'event_espresso'
85
                    ),
86
                    $form_input,
87
                    $input_value
88
                ),
89
                __FILE__,
90
                __FUNCTION__,
91
                __LINE__
92
            );
93
            return false;
94
        }
95
        return true;
96
    }
97

core/helpers/EEH_Sideloader.helper.php 1 location

@@ 75-92 (lines=18) @@
72
73
        foreach ($props as $property => $val) {
74
            $setter = 'set' . $property;
75
            if (method_exists($this, $setter)) {
76
                $this->$setter($val);
77
            } else {
78
                // No setter found.
79
                EE_Error::add_error(
80
                    sprintf(
81
                        esc_html__(
82
                            'EEH_Sideloader::%1$s not found. There is no setter for the %2$s property.',
83
                            'event_espresso'
84
                        ),
85
                        $setter,
86
                        $property
87
                    ),
88
                    __FILE__,
89
                    __FUNCTION__,
90
                    __LINE__
91
                );
92
            }
93
        }
94
95
        // make sure we include the required wp file for needed functions