Code Duplication    Length = 6-6 lines in 2 locations

src/Intraface/modules/debtor/Controller/Send.php 1 location

@@ 68-73 (lines=6) @@
65
                break;
66
        }
67
68
        if (($debtor->get("type") == "order" || $debtor->get("type") == "invoice") && $this->context->getKernel()->intranet->hasModuleAccess('onlinepayment')) {
69
            $this->context->getKernel()->useModule('onlinepayment');
70
            $onlinepayment = OnlinePayment::factory($this->context->getKernel());
71
        } else {
72
            $onlinepayment = null;
73
        }
74
75
        if ($this->context->getKernel()->intranet->get("pdf_header_file_id") != 0) {
76
            $file = new FileHandler($this->context->getKernel(), $this->context->getKernel()->intranet->get("pdf_header_file_id"));

src/Intraface/XMLRPC/Debtor/Server.php 1 location

@@ 140-145 (lines=6) @@
137
            return '';
138
        }
139
140
        if (($debtor->get("type") == "order" || $debtor->get("type") == "invoice") && $this->kernel->intranet->hasModuleAccess('onlinepayment')) {
141
            $this->kernel->useModule('onlinepayment');
142
            $onlinepayment = OnlinePayment::factory($this->kernel);
143
        } else {
144
            $onlinepayment = null;
145
        }
146
147
        if ($this->kernel->intranet->get("pdf_header_file_id") != 0) {
148
            $this->kernel->useModule('filemanager');