Skip to content

Commit 5375ec1

Browse files
committed
MAGETWO-53850: API interfaces lack @api annotation
- improve static test
1 parent 0bbf590 commit 5375ec1

22 files changed

+27
-206
lines changed

app/code/Magento/CatalogRule/Api/CatalogRuleRepositoryInterface.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,34 @@
55
*/
66
namespace Magento\CatalogRule\Api;
77

8+
/**
9+
* Interface CatalogRuleRepositoryInterface
10+
* @api
11+
*/
812
interface CatalogRuleRepositoryInterface
913
{
1014
/**
11-
* @api
1215
* @param \Magento\CatalogRule\Api\Data\RuleInterface $rule
1316
* @return \Magento\CatalogRule\Api\Data\RuleInterface
1417
* @throws \Magento\Framework\Exception\CouldNotSaveException
1518
*/
1619
public function save(\Magento\CatalogRule\Api\Data\RuleInterface $rule);
1720

1821
/**
19-
* @api
2022
* @param int $ruleId
2123
* @return \Magento\CatalogRule\Api\Data\RuleInterface
2224
* @throws \Magento\Framework\Exception\NoSuchEntityException
2325
*/
2426
public function get($ruleId);
2527

2628
/**
27-
* @api
2829
* @param \Magento\CatalogRule\Api\Data\RuleInterface $rule
2930
* @return bool
3031
* @throws \Magento\Framework\Exception\CouldNotDeleteException
3132
*/
3233
public function delete(\Magento\CatalogRule\Api\Data\RuleInterface $rule);
3334

3435
/**
35-
* @api
3636
* @param int $ruleId
3737
* @return bool
3838
* @throws \Magento\Framework\Exception\CouldNotDeleteException

app/code/Magento/Customer/Api/AccountManagementInterface.php

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
/**
1111
* Interface for managing customers accounts.
12+
* @api
1213
*/
1314
interface AccountManagementInterface
1415
{
@@ -24,7 +25,6 @@ interface AccountManagementInterface
2425
/**
2526
* Create customer account. Perform necessary business operations like sending email.
2627
*
27-
* @api
2828
* @param \Magento\Customer\Api\Data\CustomerInterface $customer
2929
* @param string $password
3030
* @param string $redirectUrl
@@ -59,7 +59,6 @@ public function createAccountWithPasswordHash(
5959
/**
6060
* Validate customer data.
6161
*
62-
* @api
6362
* @param \Magento\Customer\Api\Data\CustomerInterface $customer
6463
* @return \Magento\Customer\Api\Data\ValidationResultsInterface
6564
* @throws \Magento\Framework\Exception\LocalizedException
@@ -80,7 +79,6 @@ public function isReadonly($customerId);
8079
/**
8180
* Activate a customer account using a key that was sent in a confirmation email.
8281
*
83-
* @api
8482
* @param string $email
8583
* @param string $confirmationKey
8684
* @return \Magento\Customer\Api\Data\CustomerInterface
@@ -102,7 +100,6 @@ public function activateById($customerId, $confirmationKey);
102100
/**
103101
* Authenticate a customer by username and password
104102
*
105-
* @api
106103
* @param string $email
107104
* @param string $password
108105
* @return \Magento\Customer\Api\Data\CustomerInterface
@@ -113,7 +110,6 @@ public function authenticate($email, $password);
113110
/**
114111
* Change customer password.
115112
*
116-
* @api
117113
* @param string $email
118114
* @param string $currentPassword
119115
* @param string $newPassword
@@ -125,7 +121,6 @@ public function changePassword($email, $currentPassword, $newPassword);
125121
/**
126122
* Change customer password.
127123
*
128-
* @api
129124
* @param int $customerId
130125
* @param string $currentPassword
131126
* @param string $newPassword
@@ -137,7 +132,6 @@ public function changePasswordById($customerId, $currentPassword, $newPassword);
137132
/**
138133
* Send an email to the customer with a password reset link.
139134
*
140-
* @api
141135
* @param string $email
142136
* @param string $template
143137
* @param int $websiteId
@@ -149,7 +143,6 @@ public function initiatePasswordReset($email, $template, $websiteId = null);
149143
/**
150144
* Reset customer password.
151145
*
152-
* @api
153146
* @param string $email
154147
* @param string $resetToken
155148
* @param string $newPassword
@@ -161,7 +154,6 @@ public function resetPassword($email, $resetToken, $newPassword);
161154
/**
162155
* Check if password reset token is valid.
163156
*
164-
* @api
165157
* @param int $customerId
166158
* @param string $resetPasswordLinkToken
167159
* @return bool True if the token is valid
@@ -176,7 +168,6 @@ public function validateResetPasswordLinkToken($customerId, $resetPasswordLinkTo
176168
/**
177169
* Gets the account confirmation status.
178170
*
179-
* @api
180171
* @param int $customerId
181172
* @return string
182173
* @throws \Magento\Framework\Exception\LocalizedException
@@ -186,7 +177,6 @@ public function getConfirmationStatus($customerId);
186177
/**
187178
* Resend confirmation email.
188179
*
189-
* @api
190180
* @param string $email
191181
* @param int $websiteId
192182
* @param string $redirectUrl
@@ -198,7 +188,6 @@ public function resendConfirmation($email, $websiteId, $redirectUrl = '');
198188
/**
199189
* Check if given email is associated with a customer account in given website.
200190
*
201-
* @api
202191
* @param string $customerEmail
203192
* @param int $websiteId If not set, will use the current websiteId
204193
* @return bool
@@ -209,7 +198,6 @@ public function isEmailAvailable($customerEmail, $websiteId = null);
209198
/**
210199
* Check store availability for customer given the customerId.
211200
*
212-
* @api
213201
* @param int $customerWebsiteId
214202
* @param int $storeId
215203
* @return bool
@@ -220,7 +208,6 @@ public function isCustomerInStore($customerWebsiteId, $storeId);
220208
/**
221209
* Retrieve default billing address for the given customerId.
222210
*
223-
* @api
224211
* @param int $customerId
225212
* @return \Magento\Customer\Api\Data\AddressInterface
226213
* @throws \Magento\Framework\Exception\NoSuchEntityException If the customer Id is invalid
@@ -231,7 +218,6 @@ public function getDefaultBillingAddress($customerId);
231218
/**
232219
* Retrieve default shipping address for the given customerId.
233220
*
234-
* @api
235221
* @param int $customerId
236222
* @return \Magento\Customer\Api\Data\AddressInterface
237223
* @throws \Magento\Framework\Exception\NoSuchEntityException If the customer Id is invalid
@@ -242,7 +228,6 @@ public function getDefaultShippingAddress($customerId);
242228
/**
243229
* Return hashed password, which can be directly saved to database.
244230
*
245-
* @api
246231
* @param string $password
247232
* @return string
248233
*/

app/code/Magento/Customer/Api/AddressRepositoryInterface.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88

99
/**
1010
* Customer address CRUD interface.
11+
* @api
1112
*/
1213
interface AddressRepositoryInterface
1314
{
1415
/**
1516
* Save customer address.
1617
*
17-
* @api
1818
* @param \Magento\Customer\Api\Data\AddressInterface $address
1919
* @return \Magento\Customer\Api\Data\AddressInterface
2020
* @throws \Magento\Framework\Exception\LocalizedException
@@ -24,7 +24,6 @@ public function save(\Magento\Customer\Api\Data\AddressInterface $address);
2424
/**
2525
* Retrieve customer address.
2626
*
27-
* @api
2827
* @param int $addressId
2928
* @return \Magento\Customer\Api\Data\AddressInterface
3029
* @throws \Magento\Framework\Exception\LocalizedException
@@ -34,7 +33,6 @@ public function getById($addressId);
3433
/**
3534
* Retrieve customers addresses matching the specified criteria.
3635
*
37-
* @api
3836
* @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
3937
* @return \Magento\Customer\Api\Data\AddressSearchResultsInterface
4038
* @throws \Magento\Framework\Exception\LocalizedException
@@ -44,7 +42,6 @@ public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCr
4442
/**
4543
* Delete customer address.
4644
*
47-
* @api
4845
* @param \Magento\Customer\Api\Data\AddressInterface $address
4946
* @return bool true on success
5047
* @throws \Magento\Framework\Exception\LocalizedException
@@ -54,7 +51,6 @@ public function delete(\Magento\Customer\Api\Data\AddressInterface $address);
5451
/**
5552
* Delete customer address by ID.
5653
*
57-
* @api
5854
* @param int $addressId
5955
* @return bool true on success
6056
* @throws \Magento\Framework\Exception\NoSuchEntityException

app/code/Magento/Customer/Api/CustomerRepositoryInterface.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99

1010
/**
1111
* Customer CRUD interface.
12+
* @api
1213
*/
1314
interface CustomerRepositoryInterface
1415
{
1516
/**
1617
* Create or update a customer.
1718
*
18-
* @api
1919
* @param \Magento\Customer\Api\Data\CustomerInterface $customer
2020
* @param string $passwordHash
2121
* @return \Magento\Customer\Api\Data\CustomerInterface
@@ -28,7 +28,6 @@ public function save(\Magento\Customer\Api\Data\CustomerInterface $customer, $pa
2828
/**
2929
* Retrieve customer.
3030
*
31-
* @api
3231
* @param string $email
3332
* @param int|null $websiteId
3433
* @return \Magento\Customer\Api\Data\CustomerInterface
@@ -40,7 +39,6 @@ public function get($email, $websiteId = null);
4039
/**
4140
* Get customer by customer ID.
4241
*
43-
* @api
4442
* @param int $customerId
4543
* @return \Magento\Customer\Api\Data\CustomerInterface
4644
* @throws \Magento\Framework\Exception\NoSuchEntityException If customer with the specified ID does not exist.
@@ -55,7 +53,6 @@ public function getById($customerId);
5553
* included. See http://devdocs.magento.com/codelinks/attributes.html#CustomerRepositoryInterface to determine
5654
* which call to use to get detailed information about all attributes for an object.
5755
*
58-
* @api
5956
* @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
6057
* @return \Magento\Customer\Api\Data\CustomerSearchResultsInterface
6158
* @throws \Magento\Framework\Exception\LocalizedException
@@ -65,7 +62,6 @@ public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCr
6562
/**
6663
* Delete customer.
6764
*
68-
* @api
6965
* @param \Magento\Customer\Api\Data\CustomerInterface $customer
7066
* @return bool true on success
7167
* @throws \Magento\Framework\Exception\LocalizedException
@@ -75,7 +71,6 @@ public function delete(\Magento\Customer\Api\Data\CustomerInterface $customer);
7571
/**
7672
* Delete customer by ID.
7773
*
78-
* @api
7974
* @param int $customerId
8075
* @return bool true on success
8176
* @throws \Magento\Framework\Exception\NoSuchEntityException

0 commit comments

Comments
 (0)