Code Duplication    Length = 5-7 lines in 2 locations

core/admin/EE_Admin_Page.core.php 1 location

@@ 825-831 (lines=7) @@
822
        $nonce_check = isset($this->_route_config['require_nonce'])
823
            ? $this->_route_config['require_nonce']
824
            : true;
825
        if ($this->_req_action !== 'default' && $nonce_check) {
826
            // set nonce from post data
827
            $nonce = isset($this->_req_data[$this->_req_nonce])
828
                ? sanitize_text_field($this->_req_data[$this->_req_nonce])
829
                : '';
830
            $this->_verify_nonce($nonce, $this->_req_nonce);
831
        }
832
        //set the nav_tabs array but ONLY if this is  UI_request
833
        if ($this->_is_UI_request) {
834
            $this->_set_nav_tabs();

admin_pages/registrations/Registrations_Admin_Page.core.php 1 location

@@ 3030-3034 (lines=5) @@
3027
        $cart = EE_Registry::instance()->SSN->cart();
3028
        $step = ! $cart instanceof EE_Cart ? 'ticket' : 'questions';
3029
        //if doing ajax then we need to verify the nonce
3030
        if (defined('DOING_AJAX')) {
3031
            $nonce = isset($this->_req_data[$this->_req_nonce])
3032
                ? sanitize_text_field($this->_req_data[$this->_req_nonce]) : '';
3033
            $this->_verify_nonce($nonce, $this->_req_nonce);
3034
        }
3035
        switch ($step) {
3036
            case 'ticket' :
3037
                //process ticket selection