Code Duplication    Length = 5-5 lines in 2 locations

admin/gateways/pec24/nusoap.php 2 locations

@@ 479-483 (lines=5) @@
476
        if ($type != '' && isset($this->typemap[$this->XMLSchemaVersion][$type])) {
477
            $this->debug("serialize_val: serialize xsd built-in primitive type");
478
            if (is_bool($val)) {
479
                if ($type == 'boolean') {
480
                    $val = $val ? 'true' : 'false';
481
                } elseif (! $val) {
482
                    $val = 0;
483
                }
484
            } else if (is_string($val)) {
485
                $val = $this->expandEntities($val);
486
            }
@@ 504-508 (lines=5) @@
501
        switch (true) {
502
            case (is_bool($val) || $type == 'boolean'):
503
                $this->debug("serialize_val: serialize boolean");
504
                if ($type == 'boolean') {
505
                    $val = $val ? 'true' : 'false';
506
                } elseif (! $val) {
507
                    $val = 0;
508
                }
509
                if ($use == 'literal') {
510
                    $xml .= "<$name$xmlns$atts>$val</$name>";
511
                } else {