Code Duplication    Length = 9-9 lines in 2 locations

src/Service/Customer/CustomerService.php 2 locations

@@ 42-50 (lines=9) @@
39
     * @param integer $customerId The customer ID.
40
     * @return Customer|null
41
     */
42
    public function getCustomer($customerId)
43
    {
44
        $requestData = new Get\RequestData();
45
        $requestData->setCustomerId($customerId);
46
47
        $customers = $this->getCustomers($requestData)->getResponse()->getCustomers();
48
49
        return isset($customers[0]) ? $customers[0] : null;
50
    }
51
52
    /**
53
     * Get once customer by the external ID.
@@ 58-66 (lines=9) @@
55
     * @param string $customerExternalUid The external customer ID.
56
     * @return Customer|null
57
     */
58
    public function getCustomerByExternalUid($customerExternalUid)
59
    {
60
        $requestData = new Get\RequestData();
61
        $requestData->setCustomerExternalUid($customerExternalUid);
62
63
        $customers = $this->getCustomers($requestData)->getResponse()->getCustomers();
64
65
        return isset($customers[0]) ? $customers[0] : null;
66
    }
67
68
    /**
69
     * Update a customer.