Skip to content

Commit

Permalink
CORE-778: Remove unused methods
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilinTv committed Jun 9, 2017
1 parent 666d5f0 commit d1478de
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 104 deletions.
34 changes: 0 additions & 34 deletions src/Spryker/Zed/Customer/Business/Customer/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

}
14 changes: 0 additions & 14 deletions src/Spryker/Zed/Customer/Business/Customer/CustomerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

}
32 changes: 0 additions & 32 deletions src/Spryker/Zed/Customer/Business/CustomerFacade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

}
24 changes: 0 additions & 24 deletions src/Spryker/Zed/Customer/Business/CustomerFacadeInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

}

0 comments on commit d1478de

Please sign in to comment.