Code Duplication    Length = 7-9 lines in 2 locations

admin/gateways/pec24/nusoap.php 2 locations

@@ 6484-6490 (lines=7) @@
6481
                }
6482
            }
6483
            if (null === $value) {
6484
                if ($use === 'literal') {
6485
                    // TODO: depends on minOccurs
6486
                    $xml = "<$name$elementNS/>";
6487
                } else {
6488
                    $xml = "<$name$elementNS xsi:nil=\"true\" xsi:type=\"" . $this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') . ":Array\" " . $this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/')
6489
                           . ':arrayType="' . $this->getPrefixFromNamespace($this->getPrefix($typeDef['arrayType'])) . ':' . $this->getLocalPart($typeDef['arrayType']) . "[0]\"/>";
6490
                }
6491
                $this->debug("in serializeType: returning: $xml");
6492
6493
                return $xml;
@@ 6525-6533 (lines=9) @@
6522
            // array.  Revisit this when coding the handling of null/nil values.
6523
            if ($use === 'literal') {
6524
                $xml = "<$name$elementNS>" . $contents . "</$name>";
6525
            } else {
6526
                $xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') . ':Array" ' . $this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') . ':arrayType="'
6527
                       . $this->getPrefixFromNamespace($this->getPrefix($typeDef['arrayType'])) . ':' . $this->getLocalPart($typeDef['arrayType']) . "[$rows$cols]\">" . $contents . "</$name>";
6528
            }
6529
        } elseif ($phpType === 'scalar') {
6530
            if (isset($typeDef['form']) && ($typeDef['form'] === 'qualified')) {
6531
                $elementNS = " xmlns=\"$ns\"";
6532
            } else {
6533
                if ($unqualified) {
6534
                    $elementNS = " xmlns=\"\"";
6535
                } else {
6536
                    $elementNS = '';