Code Duplication    Length = 6-10 lines in 3 locations

Controllers/Frontend/PaymentKlarna.php 3 locations

@@ 699-704 (lines=6) @@
696
            if (!empty($session->sUserId)) {
697
                if ($order !== null) {
698
                    $module->sSYSTEM->_POST = $data['shipping'];
699
                    if (Shopware::VERSION === '___VERSION___' || version_compare(Shopware::VERSION, '5.2.0', '>=')) {
700
                        $userId = $session->offsetGet('sUserId');
701
                        $this->updateShipping($userId, $data['shipping']);
702
                    } else {
703
                        $module->sUpdateShipping();
704
                    }
705
                    $module->sSYSTEM->_POST = $data['billing'];
706
                    if (Shopware::VERSION === '___VERSION___' || version_compare(Shopware::VERSION, '5.2.0', '>=')) {                
707
                         $userId = $session->offsetGet('sUserId');
@@ 706-711 (lines=6) @@
703
                        $module->sUpdateShipping();
704
                    }
705
                    $module->sSYSTEM->_POST = $data['billing'];
706
                    if (Shopware::VERSION === '___VERSION___' || version_compare(Shopware::VERSION, '5.2.0', '>=')) {                
707
                         $userId = $session->offsetGet('sUserId');
708
                         $this->updateBilling($userId, $data['billing']);
709
                    } else{
710
                        $module->sUpdateBilling();
711
                    }
712
                    unset($data['auth']['password']);
713
                    $module->sSYSTEM->_POST = $data['auth'];
714
                    if (Shopware::VERSION === '___VERSION___' || version_compare(Shopware::VERSION, '5.2.0', '>=')) {
@@ 731-740 (lines=10) @@
728
                        'SELECT id FROM s_user_shippingaddress WHERE userID = ?',
729
                        array($session->offsetGet('sUserId'))
730
                    );
731
                    if (!empty($shippingId)) {
732
                        if (Shopware::VERSION === '___VERSION___' || version_compare(Shopware::VERSION, '5.2.0', '>=')) {
733
                            $userId = $session->offsetGet('sUserId');
734
                            $this->updateShipping($userId, $data['shipping']);
735
                        } else {
736
                            $module->sUpdateShipping();
737
                        }
738
                    } else {
739
                        $module->sUpdateBilling();
740
                    }
741
                }
742
                $module->sSYSTEM->_POST = array('sPayment' => $paymentId);
743
                $module->sUpdatePayment();