Code Duplication    Length = 5-5 lines in 2 locations

Controllers/Backend/PaymentKlarna.php 2 locations

@@ 124-128 (lines=5) @@
121
        $service = $this->getService($order);
122
        $detailStatus = $this->modelManager->find('\Shopware\Models\Order\DetailStatus', 3);
123
        $paymentStatus = $this->plugin->Config()->get('activateStatusId');
124
        if (!empty($paymentStatus)) {
125
            $paymentStatus = $this->modelManager->find('\Shopware\Models\Order\Status', $paymentStatus);
126
        } else {
127
            $paymentStatus = null;
128
        }
129
130
        /** @var Shopware\Models\Order\Detail $position */
131
        foreach ($order->getDetails() as $position) {
@@ 248-252 (lines=5) @@
245
        $service = $this->getService($order);
246
        $detailStatus = $this->modelManager->find('\Shopware\Models\Order\DetailStatus', 2);
247
        $paymentStatus = $this->plugin->Config()->get('cancelStatusId');
248
        if (!empty($paymentStatus)) {
249
            $paymentStatus = $this->modelManager->find('\Shopware\Models\Order\Status', $paymentStatus);
250
        } else {
251
            $paymentStatus = null;
252
        }
253
254
        try {
255
            /** @var Shopware\Models\Order\Detail $position */