From d1478dec00fcfc456fc388d34d8fb4b7aa11ee1f Mon Sep 17 00:00:00 2001 From: Denis Turkov Date: Fri, 9 Jun 2017 14:19:34 +0000 Subject: [PATCH] CORE-778: Remove unused methods --- .../Customer/Business/Customer/Customer.php | 34 ------------------- .../Business/Customer/CustomerInterface.php | 14 -------- .../Zed/Customer/Business/CustomerFacade.php | 32 ----------------- .../Business/CustomerFacadeInterface.php | 24 ------------- 4 files changed, 104 deletions(-) diff --git a/src/Spryker/Zed/Customer/Business/Customer/Customer.php b/src/Spryker/Zed/Customer/Business/Customer/Customer.php index 70a3d244..120cf446 100644 --- a/src/Spryker/Zed/Customer/Business/Customer/Customer.php +++ b/src/Spryker/Zed/Customer/Business/Customer/Customer.php @@ -752,38 +752,4 @@ protected function attachLocale(CustomerTransfer $customerTransfer, SpyCustomer return $customerTransfer; } - /** - * @param string $customerReference - * - * @return \Generated\Shared\Transfer\CustomerTransfer|null - */ - public function findByReference($customerReference) - { - $customerEntity = $this->queryContainer - ->queryCustomerByReference($customerReference) - ->findOne(); - - if ($customerEntity === null) { - return null; - } - - $customerTransfer = new CustomerTransfer(); - $customerTransfer->fromArray($customerEntity->toArray(), true); - $customerTransfer = $this->attachLocale($customerTransfer, $customerEntity); - - return $customerTransfer; - } - - /** - * @param string $customerReference - * - * @return bool - */ - public function hasByReference($customerReference) - { - return $this->queryContainer - ->queryCustomerByReference($customerReference) - ->exists(); - } - } diff --git a/src/Spryker/Zed/Customer/Business/Customer/CustomerInterface.php b/src/Spryker/Zed/Customer/Business/Customer/CustomerInterface.php index a56d9685..b69199e3 100644 --- a/src/Spryker/Zed/Customer/Business/Customer/CustomerInterface.php +++ b/src/Spryker/Zed/Customer/Business/Customer/CustomerInterface.php @@ -98,18 +98,4 @@ public function tryAuthorizeCustomerByEmailAndPassword(CustomerTransfer $custome */ public function findById($customerTransfer); - /** - * @param string $customerReference - * - * @return \Generated\Shared\Transfer\CustomerTransfer|null - */ - public function findByReference($customerReference); - - /** - * @param string $customerReference - * - * @return bool - */ - public function hasByReference($customerReference); - } diff --git a/src/Spryker/Zed/Customer/Business/CustomerFacade.php b/src/Spryker/Zed/Customer/Business/CustomerFacade.php index 70d9b4e5..e512f355 100644 --- a/src/Spryker/Zed/Customer/Business/CustomerFacade.php +++ b/src/Spryker/Zed/Customer/Business/CustomerFacade.php @@ -417,36 +417,4 @@ public function anonymizeCustomer(CustomerTransfer $customerTransfer) ->process($customerTransfer); } - /** - * {@inheritdoc} - * - * @api - * - * @param string $customerReference - * - * @return \Generated\Shared\Transfer\CustomerTransfer - */ - public function findCustomerByReference($customerReference) - { - return $this->getFactory() - ->createCustomer() - ->findByReference($customerReference); - } - - /** - * {@inheritdoc} - * - * @api - * - * @param string $customerReference - * - * @return bool - */ - public function hasCustomerByReference($customerReference) - { - return $this->getFactory() - ->createCustomer() - ->hasByReference($customerReference); - } - } diff --git a/src/Spryker/Zed/Customer/Business/CustomerFacadeInterface.php b/src/Spryker/Zed/Customer/Business/CustomerFacadeInterface.php index 99e2a0c7..e963a0c4 100644 --- a/src/Spryker/Zed/Customer/Business/CustomerFacadeInterface.php +++ b/src/Spryker/Zed/Customer/Business/CustomerFacadeInterface.php @@ -299,28 +299,4 @@ public function checkOrderPreSaveConditions( */ public function anonymizeCustomer(CustomerTransfer $customerTransfer); - /** - * Specification: - * - Find customer record by reference - * - * @api - * - * @param string $customerReference - * - * @return \Generated\Shared\Transfer\CustomerTransfer|null - */ - public function findCustomerByReference($customerReference); - - /** - * Specification: - * - Check reference on existing customer - * - * @api - * - * @param string $customerReference - * - * @return bool - */ - public function hasCustomerByReference($customerReference); - }