Code Duplication    Length = 20-20 lines in 4 locations

src/Intraface/XMLRPC/Shop/Server2.php 1 location

@@ 475-494 (lines=20) @@
472
     *
473
     * @return boolean true or false
474
     */
475
    public function saveAddress($credentials, $shop_id, $values)
476
    {
477
        $this->checkCredentials($credentials);
478
479
        $this->_factoryWebshop($shop_id);
480
481
        if (!is_array($values)) {
482
            require_once 'XML/RPC2/Exception.php';
483
            throw new XML_RPC2_FaultException('details could not be saved - nothing to save', -4);
484
        }
485
486
        $values = $this->processRequestData($values);
487
488
        if (!$this->webshop->getBasket()->saveAddress($values)) {
489
            require_once 'XML/RPC2/Exception.php';
490
            throw new XML_RPC2_FaultException('datails could not be saved ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4);
491
        }
492
493
        return $this->prepareResponseData(true);
494
    }
495
496
    /**
497
     * Get buyer details

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

@@ 430-449 (lines=20) @@
427
     *
428
     * @return boolean true or false
429
     */
430
    public function saveAddress($credentials, $values)
431
    {
432
        $this->checkCredentials($credentials);
433
434
        $this->_factoryWebshop();
435
436
        if (!is_array($values)) {
437
            require_once 'XML/RPC2/Exception.php';
438
            throw new XML_RPC2_FaultException('details could not be saved - nothing to save', -4);
439
        }
440
441
        $values = $this->utf8Decode($values);
442
443
        if (!$this->webshop->basket->saveAddress($values)) {
444
            require_once 'XML/RPC2/Exception.php';
445
            throw new XML_RPC2_FaultException('datails could not be saved ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4);
446
        }
447
448
        return true;
449
    }
450
451
    /**
452
     * Get buyer details

src/Intraface/XMLRPC/Shop/Server0004.php 1 location

@@ 731-750 (lines=20) @@
728
     *
729
     * @return boolean true or false
730
     */
731
    public function saveAddress($credentials, $shop_id, $values)
732
    {
733
        $this->checkCredentials($credentials);
734
735
        $this->_factoryWebshop($shop_id);
736
737
        if (!is_array($values)) {
738
            require_once 'XML/RPC2/Exception.php';
739
            throw new XML_RPC2_FaultException('details could not be saved - nothing to save', -4);
740
        }
741
742
        $values = $this->processRequestData($values);
743
744
        if (!$this->webshop->getBasket()->saveAddress($values)) {
745
            require_once 'XML/RPC2/Exception.php';
746
            throw new XML_RPC2_FaultException('datails could not be saved ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4);
747
        }
748
749
        return $this->prepareResponseData(true);
750
    }
751
752
    /**
753
     * Get buyer details

src/Intraface/XMLRPC/Shop/Server0100.php 1 location

@@ 894-913 (lines=20) @@
891
     *
892
     * @return boolean true or false
893
     */
894
    public function saveAddress($credentials, $shop_id, $values)
895
    {
896
        $this->checkCredentials($credentials);
897
898
        $this->_factoryWebshop($shop_id);
899
900
        if (!is_array($values)) {
901
            require_once 'XML/RPC2/Exception.php';
902
            throw new XML_RPC2_FaultException('details could not be saved - nothing to save', -4);
903
        }
904
905
        $values = $this->processRequestData($values);
906
907
        if (!$this->webshop->getBasket()->saveAddress($values)) {
908
            require_once 'XML/RPC2/Exception.php';
909
            throw new XML_RPC2_FaultException('datails could not be saved ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4);
910
        }
911
912
        return $this->prepareResponseData(true);
913
    }
914
915
    /**
916
     * Get buyer details