Skip to content

Commit 03d618e

Browse files
committed
DX-104 : Remainder of last rollback
1 parent 56ff280 commit 03d618e

File tree

7 files changed

+8
-18
lines changed

7 files changed

+8
-18
lines changed

src/Api/AssetManager/AssetAttributeOptionApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function upsert(string $assetFamilyCode, string $attributeCode, string $a
5151
);
5252
}
5353

54-
public function upsertAsync(string $assetFamilyCode, string $attributeCode, string $attributeOptionCode, array $data = [], ?callable $onSuccess = null, ?callable $onFail = null): PromiseInterface
54+
public function upsertAsync(string $assetFamilyCode, string $attributeCode, string $attributeOptionCode, array $data = []): PromiseInterface
5555
{
5656
return $this->resourceClient->upsertAsyncResource(
5757
static::ASSET_ATTRIBUTE_OPTION_URI,

src/Api/FamilyVariantApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function upsertList($familyCode, $familyVariants): \Traversable
106106
/**
107107
* {@inheritdoc}
108108
*/
109-
public function upsertAsync($familyCode, $familyVariantCode, array $data = [], ?callable $onSuccess = null, ?callable $onFail = null): PromiseInterface
109+
public function upsertAsync($familyCode, $familyVariantCode, array $data = []): PromiseInterface
110110
{
111111
if (array_key_exists('family', $data)) {
112112
throw new InvalidArgumentException('The parameter "family" must not be defined in the data parameter');

src/Api/ProductModelApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public function delete(string $code): int
116116
return $this->resourceClient->deleteResource(static::PRODUCT_MODEL_URI, [$code]);
117117
}
118118

119-
public function upsertAsync(string $code, array $data = [], ?callable $onSuccess = null, ?callable $onFail = null): PromiseInterface
119+
public function upsertAsync(string $code, array $data = []): PromiseInterface
120120
{
121121
if (array_key_exists('code', $data)) {
122122
throw new InvalidArgumentException('The parameter "code" must not be defined in the data parameter');

src/Api/ReferenceEntityAttributeOptionApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function upsert(string $referenceEntityCode, string $attributeCode, strin
5959
/**
6060
* {@inheritdoc}
6161
*/
62-
public function upsertAsync(string $referenceEntityCode, string $attributeCode, string $attributeOptionCode, array $data = [], ?callable $onSuccess = null, ?callable $onFail = null): PromiseInterface
62+
public function upsertAsync(string $referenceEntityCode, string $attributeCode, string $attributeOptionCode, array $data = []): PromiseInterface
6363
{
6464
return $this->resourceClient->upsertAsyncResource(
6565
static::REFERENCE_ENTITY_ATTRIBUTE_OPTION_URI,

src/Client/HttpClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,6 @@ public function sendAsync(
8585
{
8686
$request = $this->prepareRequest($httpMethod, $uri, $headers, $body);
8787

88-
return $this->httpClient->sendAsyncRequest($request)->then($onSuccess, $onFail);
88+
return $this->httpClient->sendAsyncRequest($request);
8989
}
9090
}

src/Client/HttpClientInterface.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ public function sendRequest(string $httpMethod, $uri, array $headers = [], $body
3838
* @param string|UriInterface $uri URI of the request
3939
* @param array $headers headers of the request
4040
* @param string|StreamInterface|null $body body of the request
41-
* @param ?callable $onSuccess Callback in case of success
42-
* @param ?callable $onFail Callback in case of fail
4341
*
4442
* @throws HttpException If the request failed.
4543
*

src/Client/ResourceClientInterface.php

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,10 @@ public function upsertResource(string $uri, array $uriParameters = [], array $bo
116116
* @param string $uri URI of the resource
117117
* @param array $uriParameters URI parameters of the resource
118118
* @param array $body Body of the request
119-
* @param ?callable $onSuccess Callback in case of success
120-
* @param ?callable $onFail Callback in case of fail
121119
*
122120
* @throws HttpException If the request failed.
123121
*
124-
* @return Promise
122+
* @return PromiseInterface
125123
*/
126124
public function upsertAsyncResource(
127125
string $uri,
@@ -146,8 +144,6 @@ public function upsertAndReturnResource(string $uri, array $uriParameters = [],
146144
* @param string $uri URI of the resource
147145
* @param array $uriParameters URI parameters of the resource
148146
* @param array $body Body of the request
149-
* @param ?callable $onSuccess Callback in case of success
150-
* @param ?callable $onFail Callback in case of fail
151147
*
152148
* @throws HttpException If the request failed.
153149
*
@@ -179,13 +175,11 @@ public function upsertStreamResourceList(string $uri, array $uriParameters = [],
179175
* @param array $uriParameters URI parameters of the resource
180176
* @param array|StreamInterface $resources array of resources to create or update.
181177
* You can pass your own StreamInterface implementation as well.
182-
* @param ?callable $onSuccess Callback in case of success
183-
* @param ?callable $onFail Callback in case of fail
184178
*
185179
* @throws HttpException If the request failed.
186180
* @throws InvalidArgumentException If the resources or any part thereof are invalid.
187181
*
188-
* @return Promise returns a Promise
182+
* @return PromiseInterface returns a Promise
189183
*/
190184
public function upsertAsyncStreamResourceList(
191185
string $uri,
@@ -212,13 +206,11 @@ public function upsertJsonResourceList(string $uri, array $uriParameters = [], a
212206
* @param string $uri URI of the resource
213207
* @param array $uriParameters URI parameters of the resource
214208
* @param array $resources array of resources to create or update.
215-
* @param ?callable $onSuccess Callback in case of success
216-
* @param ?callable $onFail Callback in case of fail
217209
*
218210
* @throws HttpException If the request failed.
219211
* @throws InvalidArgumentException If the resources or any part thereof are invalid.
220212
*
221-
* @return Promise
213+
* @return PromiseInterface
222214
*/
223215
public function upsertAsyncJsonResourceList(
224216
string $uri,

0 commit comments

Comments
 (0)