Skip to content

Commit 5ba0f1d

Browse files
committed
Fix phpdocumentor - comment blocks are not automatically inherited
1 parent 05e02c2 commit 5ba0f1d

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

app/code/Magento/Customer/Model/Address.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,16 @@ public function updateData(AddressInterface $address)
169169
return $this;
170170
}
171171

172+
/**
173+
* Create address data object based on current address model.
174+
*
175+
* @param int|null $defaultBillingAddressId
176+
* @param int|null $defaultShippingAddressId
177+
* @return AddressInterface
178+
* Use Api/Data/AddressInterface as a result of service operations. Don't rely on the model to provide
179+
* the instance of Api/Data/AddressInterface
180+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
181+
*/
172182
public function getDataModel($defaultBillingAddressId = null, $defaultShippingAddressId = null)
173183
{
174184
if ($this->getCustomerId() || $this->getParentId()) {

app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,18 +299,46 @@ private function populateCustomerWithSecureData($customerModel, $passwordHash =
299299
}
300300
}
301301

302+
/**
303+
* Retrieve customer.
304+
*
305+
* @param string $email
306+
* @param int|null $websiteId
307+
* @return \Magento\Customer\Api\Data\CustomerInterface
308+
* @throws \Magento\Framework\Exception\NoSuchEntityException If customer with the specified email does not exist.
309+
* @throws \Magento\Framework\Exception\LocalizedException
310+
*/
302311
public function get($email, $websiteId = null)
303312
{
304313
$customerModel = $this->customerRegistry->retrieveByEmail($email, $websiteId);
305314
return $customerModel->getDataModel();
306315
}
307316

317+
/**
318+
* Get customer by Customer ID.
319+
*
320+
* @param int $customerId
321+
* @return \Magento\Customer\Api\Data\CustomerInterface
322+
* @throws \Magento\Framework\Exception\NoSuchEntityException If customer with the specified ID does not exist.
323+
* @throws \Magento\Framework\Exception\LocalizedException
324+
*/
308325
public function getById($customerId)
309326
{
310327
$customerModel = $this->customerRegistry->retrieve($customerId);
311328
return $customerModel->getDataModel();
312329
}
313330

331+
/**
332+
* Retrieve customers which match a specified criteria.
333+
*
334+
* This call returns an array of objects, but detailed information about each object’s attributes might not be
335+
* included. See http://devdocs.magento.com/codelinks/attributes.html#CustomerRepositoryInterface to determine
336+
* which call to use to get detailed information about all attributes for an object.
337+
*
338+
* @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
339+
* @return \Magento\Customer\Api\Data\CustomerSearchResultsInterface
340+
* @throws \Magento\Framework\Exception\LocalizedException
341+
*/
314342
public function getList(SearchCriteriaInterface $searchCriteria)
315343
{
316344
$searchResults = $this->searchResultsFactory->create();
@@ -348,11 +376,26 @@ public function getList(SearchCriteriaInterface $searchCriteria)
348376
return $searchResults;
349377
}
350378

379+
/**
380+
* Delete customer.
381+
*
382+
* @param \Magento\Customer\Api\Data\CustomerInterface $customer
383+
* @return bool true on success
384+
* @throws \Magento\Framework\Exception\LocalizedException
385+
*/
351386
public function delete(CustomerInterface $customer)
352387
{
353388
return $this->deleteById($customer->getId());
354389
}
355390

391+
/**
392+
* Delete customer by Customer ID.
393+
*
394+
* @param int $customerId
395+
* @return bool true on success
396+
* @throws \Magento\Framework\Exception\NoSuchEntityException
397+
* @throws \Magento\Framework\Exception\LocalizedException
398+
*/
356399
public function deleteById($customerId)
357400
{
358401
$customerModel = $this->customerRegistry->retrieve($customerId);

0 commit comments

Comments
 (0)