Skip to content

Commit 26825d0

Browse files
ENGCOM-4629: Cleaner documentation for Travis CI static tests #18386
- Merge Pull Request #18386 from Thundar/magento2:2.3documentator - Merged commits: 1. bd224a5 2. 34fdfec 3. 05e02c2 4. 5ba0f1d 5. 2766e27
2 parents 2bca2aa + 2766e27 commit 26825d0

File tree

3 files changed

+59
-13
lines changed

3 files changed

+59
-13
lines changed

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

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function __construct(
122122
}
123123

124124
/**
125-
* Init model
125+
* Initialize address model
126126
*
127127
* @return void
128128
*/
@@ -167,7 +167,14 @@ public function updateData(AddressInterface $address)
167167
}
168168

169169
/**
170-
* @inheritdoc
170+
* Create address data object based on current address model.
171+
*
172+
* @param int|null $defaultBillingAddressId
173+
* @param int|null $defaultShippingAddressId
174+
* @return AddressInterface
175+
* Use Api/Data/AddressInterface as a result of service operations. Don't rely on the model to provide
176+
* the instance of Api/Data/AddressInterface
177+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
171178
*/
172179
public function getDataModel($defaultBillingAddressId = null, $defaultShippingAddressId = null)
173180
{
@@ -257,7 +264,7 @@ public function getDefaultAttributeCodes()
257264
}
258265

259266
/**
260-
* Clone object handler
267+
* Clone address
261268
*
262269
* @return void
263270
*/
@@ -356,7 +363,11 @@ public function reindex()
356363
}
357364

358365
/**
359-
* @inheritdoc
366+
* Get a list of custom attribute codes.
367+
*
368+
* By default, entity can be extended only using extension attributes functionality.
369+
*
370+
* @return string[]
360371
* @since 100.0.6
361372
*/
362373
protected function getCustomAttributesCodes()

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1305,7 +1305,7 @@ public function getResetPasswordLinkExpirationPeriod()
13051305
}
13061306

13071307
/**
1308-
* Create address instance
1308+
* Create Address from Factory
13091309
*
13101310
* @return Address
13111311
*/
@@ -1315,7 +1315,7 @@ protected function _createAddressInstance()
13151315
}
13161316

13171317
/**
1318-
* Create address collection instance
1318+
* Create Address Collection from Factory
13191319
*
13201320
* @return \Magento\Customer\Model\ResourceModel\Address\Collection
13211321
*/
@@ -1325,7 +1325,7 @@ protected function _createAddressCollection()
13251325
}
13261326

13271327
/**
1328-
* Returns templates types
1328+
* Get Template Types
13291329
*
13301330
* @return array
13311331
*/

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

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,14 @@ public function __construct(
171171
}
172172

173173
/**
174-
* @inheritdoc
174+
* Create or update a customer.
175+
*
176+
* @param \Magento\Customer\Api\Data\CustomerInterface $customer
177+
* @param string $passwordHash
178+
* @return \Magento\Customer\Api\Data\CustomerInterface
179+
* @throws \Magento\Framework\Exception\InputException If bad input is provided
180+
* @throws \Magento\Framework\Exception\State\InputMismatchException If the provided email is already used
181+
* @throws \Magento\Framework\Exception\LocalizedException
175182
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
176183
* @SuppressWarnings(PHPMD.NPathComplexity)
177184
*/
@@ -304,7 +311,13 @@ private function populateCustomerWithSecureData($customerModel, $passwordHash =
304311
}
305312

306313
/**
307-
* @inheritdoc
314+
* Retrieve customer.
315+
*
316+
* @param string $email
317+
* @param int|null $websiteId
318+
* @return \Magento\Customer\Api\Data\CustomerInterface
319+
* @throws \Magento\Framework\Exception\NoSuchEntityException If customer with the specified email does not exist.
320+
* @throws \Magento\Framework\Exception\LocalizedException
308321
*/
309322
public function get($email, $websiteId = null)
310323
{
@@ -313,7 +326,12 @@ public function get($email, $websiteId = null)
313326
}
314327

315328
/**
316-
* @inheritdoc
329+
* Get customer by Customer ID.
330+
*
331+
* @param int $customerId
332+
* @return \Magento\Customer\Api\Data\CustomerInterface
333+
* @throws \Magento\Framework\Exception\NoSuchEntityException If customer with the specified ID does not exist.
334+
* @throws \Magento\Framework\Exception\LocalizedException
317335
*/
318336
public function getById($customerId)
319337
{
@@ -322,7 +340,15 @@ public function getById($customerId)
322340
}
323341

324342
/**
325-
* @inheritdoc
343+
* Retrieve customers which match a specified criteria.
344+
*
345+
* This call returns an array of objects, but detailed information about each object’s attributes might not be
346+
* included. See http://devdocs.magento.com/codelinks/attributes.html#CustomerRepositoryInterface to determine
347+
* which call to use to get detailed information about all attributes for an object.
348+
*
349+
* @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
350+
* @return \Magento\Customer\Api\Data\CustomerSearchResultsInterface
351+
* @throws \Magento\Framework\Exception\LocalizedException
326352
*/
327353
public function getList(SearchCriteriaInterface $searchCriteria)
328354
{
@@ -362,15 +388,24 @@ public function getList(SearchCriteriaInterface $searchCriteria)
362388
}
363389

364390
/**
365-
* @inheritdoc
391+
* Delete customer.
392+
*
393+
* @param \Magento\Customer\Api\Data\CustomerInterface $customer
394+
* @return bool true on success
395+
* @throws \Magento\Framework\Exception\LocalizedException
366396
*/
367397
public function delete(CustomerInterface $customer)
368398
{
369399
return $this->deleteById($customer->getId());
370400
}
371401

372402
/**
373-
* @inheritdoc
403+
* Delete customer by Customer ID.
404+
*
405+
* @param int $customerId
406+
* @return bool true on success
407+
* @throws \Magento\Framework\Exception\NoSuchEntityException
408+
* @throws \Magento\Framework\Exception\LocalizedException
374409
*/
375410
public function deleteById($customerId)
376411
{

0 commit comments

Comments
 (0)