Skip to content

Commit 1a3902d

Browse files
authored
Bump php-cs-fixer to version 3.60 (#1743)
1 parent 6b26da9 commit 1a3902d

14 files changed

+32
-28
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## NOT RELEASED
44

5+
### Changed
6+
7+
- Enable compiler optimization for the `sprintf` function.
8+
59
## 2.1.1
610

711
### Changed

src/Input/ChangeMessageVisibilityBatchRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,11 @@ private function requestBody(): array
116116
{
117117
$payload = [];
118118
if (null === $v = $this->queueUrl) {
119-
throw new InvalidArgument(sprintf('Missing parameter "QueueUrl" for "%s". The value cannot be null.', __CLASS__));
119+
throw new InvalidArgument(\sprintf('Missing parameter "QueueUrl" for "%s". The value cannot be null.', __CLASS__));
120120
}
121121
$payload['QueueUrl'] = $v;
122122
if (null === $v = $this->entries) {
123-
throw new InvalidArgument(sprintf('Missing parameter "Entries" for "%s". The value cannot be null.', __CLASS__));
123+
throw new InvalidArgument(\sprintf('Missing parameter "Entries" for "%s". The value cannot be null.', __CLASS__));
124124
}
125125

126126
$index = -1;

src/Input/ChangeMessageVisibilityRequest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,15 @@ private function requestBody(): array
134134
{
135135
$payload = [];
136136
if (null === $v = $this->queueUrl) {
137-
throw new InvalidArgument(sprintf('Missing parameter "QueueUrl" for "%s". The value cannot be null.', __CLASS__));
137+
throw new InvalidArgument(\sprintf('Missing parameter "QueueUrl" for "%s". The value cannot be null.', __CLASS__));
138138
}
139139
$payload['QueueUrl'] = $v;
140140
if (null === $v = $this->receiptHandle) {
141-
throw new InvalidArgument(sprintf('Missing parameter "ReceiptHandle" for "%s". The value cannot be null.', __CLASS__));
141+
throw new InvalidArgument(\sprintf('Missing parameter "ReceiptHandle" for "%s". The value cannot be null.', __CLASS__));
142142
}
143143
$payload['ReceiptHandle'] = $v;
144144
if (null === $v = $this->visibilityTimeout) {
145-
throw new InvalidArgument(sprintf('Missing parameter "VisibilityTimeout" for "%s". The value cannot be null.', __CLASS__));
145+
throw new InvalidArgument(\sprintf('Missing parameter "VisibilityTimeout" for "%s". The value cannot be null.', __CLASS__));
146146
}
147147
$payload['VisibilityTimeout'] = $v;
148148

src/Input/CreateQueueRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ private function requestBody(): array
295295
{
296296
$payload = [];
297297
if (null === $v = $this->queueName) {
298-
throw new InvalidArgument(sprintf('Missing parameter "QueueName" for "%s". The value cannot be null.', __CLASS__));
298+
throw new InvalidArgument(\sprintf('Missing parameter "QueueName" for "%s". The value cannot be null.', __CLASS__));
299299
}
300300
$payload['QueueName'] = $v;
301301
if (null !== $v = $this->attributes) {
@@ -305,7 +305,7 @@ private function requestBody(): array
305305
$payload['Attributes'] = [];
306306
foreach ($v as $name => $mv) {
307307
if (!QueueAttributeName::exists($name)) {
308-
throw new InvalidArgument(sprintf('Invalid key for "%s". The value "%s" is not a valid "QueueAttributeName".', __CLASS__, $name));
308+
throw new InvalidArgument(\sprintf('Invalid key for "%s". The value "%s" is not a valid "QueueAttributeName".', __CLASS__, $name));
309309
}
310310
$payload['Attributes'][$name] = $mv;
311311
}

src/Input/DeleteMessageBatchRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,11 @@ private function requestBody(): array
116116
{
117117
$payload = [];
118118
if (null === $v = $this->queueUrl) {
119-
throw new InvalidArgument(sprintf('Missing parameter "QueueUrl" for "%s". The value cannot be null.', __CLASS__));
119+
throw new InvalidArgument(\sprintf('Missing parameter "QueueUrl" for "%s". The value cannot be null.', __CLASS__));
120120
}
121121
$payload['QueueUrl'] = $v;
122122
if (null === $v = $this->entries) {
123-
throw new InvalidArgument(sprintf('Missing parameter "Entries" for "%s". The value cannot be null.', __CLASS__));
123+
throw new InvalidArgument(\sprintf('Missing parameter "Entries" for "%s". The value cannot be null.', __CLASS__));
124124
}
125125

126126
$index = -1;

src/Input/DeleteMessageRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,11 @@ private function requestBody(): array
109109
{
110110
$payload = [];
111111
if (null === $v = $this->queueUrl) {
112-
throw new InvalidArgument(sprintf('Missing parameter "QueueUrl" for "%s". The value cannot be null.', __CLASS__));
112+
throw new InvalidArgument(\sprintf('Missing parameter "QueueUrl" for "%s". The value cannot be null.', __CLASS__));
113113
}
114114
$payload['QueueUrl'] = $v;
115115
if (null === $v = $this->receiptHandle) {
116-
throw new InvalidArgument(sprintf('Missing parameter "ReceiptHandle" for "%s". The value cannot be null.', __CLASS__));
116+
throw new InvalidArgument(\sprintf('Missing parameter "ReceiptHandle" for "%s". The value cannot be null.', __CLASS__));
117117
}
118118
$payload['ReceiptHandle'] = $v;
119119

src/Input/DeleteQueueRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ private function requestBody(): array
8585
{
8686
$payload = [];
8787
if (null === $v = $this->queueUrl) {
88-
throw new InvalidArgument(sprintf('Missing parameter "QueueUrl" for "%s". The value cannot be null.', __CLASS__));
88+
throw new InvalidArgument(\sprintf('Missing parameter "QueueUrl" for "%s". The value cannot be null.', __CLASS__));
8989
}
9090
$payload['QueueUrl'] = $v;
9191

src/Input/GetQueueAttributesRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ private function requestBody(): array
239239
{
240240
$payload = [];
241241
if (null === $v = $this->queueUrl) {
242-
throw new InvalidArgument(sprintf('Missing parameter "QueueUrl" for "%s". The value cannot be null.', __CLASS__));
242+
throw new InvalidArgument(\sprintf('Missing parameter "QueueUrl" for "%s". The value cannot be null.', __CLASS__));
243243
}
244244
$payload['QueueUrl'] = $v;
245245
if (null !== $v = $this->attributeNames) {
@@ -248,7 +248,7 @@ private function requestBody(): array
248248
foreach ($v as $listValue) {
249249
++$index;
250250
if (!QueueAttributeName::exists($listValue)) {
251-
throw new InvalidArgument(sprintf('Invalid parameter "AttributeNames" for "%s". The value "%s" is not a valid "QueueAttributeName".', __CLASS__, $listValue));
251+
throw new InvalidArgument(\sprintf('Invalid parameter "AttributeNames" for "%s". The value "%s" is not a valid "QueueAttributeName".', __CLASS__, $listValue));
252252
}
253253
$payload['AttributeNames'][$index] = $listValue;
254254
}

src/Input/GetQueueUrlRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ private function requestBody(): array
108108
{
109109
$payload = [];
110110
if (null === $v = $this->queueName) {
111-
throw new InvalidArgument(sprintf('Missing parameter "QueueName" for "%s". The value cannot be null.', __CLASS__));
111+
throw new InvalidArgument(\sprintf('Missing parameter "QueueName" for "%s". The value cannot be null.', __CLASS__));
112112
}
113113
$payload['QueueName'] = $v;
114114
if (null !== $v = $this->queueOwnerAwsAccountId) {

src/Input/PurgeQueueRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ private function requestBody(): array
8585
{
8686
$payload = [];
8787
if (null === $v = $this->queueUrl) {
88-
throw new InvalidArgument(sprintf('Missing parameter "QueueUrl" for "%s". The value cannot be null.', __CLASS__));
88+
throw new InvalidArgument(\sprintf('Missing parameter "QueueUrl" for "%s". The value cannot be null.', __CLASS__));
8989
}
9090
$payload['QueueUrl'] = $v;
9191

src/Input/ReceiveMessageRequest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ public static function create($input): self
201201
*/
202202
public function getAttributeNames(): array
203203
{
204-
@trigger_error(sprintf('The property "AttributeNames" of "%s" is deprecated by AWS.', __CLASS__), \E_USER_DEPRECATED);
204+
@trigger_error(\sprintf('The property "AttributeNames" of "%s" is deprecated by AWS.', __CLASS__), \E_USER_DEPRECATED);
205205

206206
return $this->attributeNames ?? [];
207207
}
@@ -280,7 +280,7 @@ public function request(): Request
280280
*/
281281
public function setAttributeNames(array $value): self
282282
{
283-
@trigger_error(sprintf('The property "AttributeNames" of "%s" is deprecated by AWS.', __CLASS__), \E_USER_DEPRECATED);
283+
@trigger_error(\sprintf('The property "AttributeNames" of "%s" is deprecated by AWS.', __CLASS__), \E_USER_DEPRECATED);
284284
$this->attributeNames = $value;
285285

286286
return $this;
@@ -345,17 +345,17 @@ private function requestBody(): array
345345
{
346346
$payload = [];
347347
if (null === $v = $this->queueUrl) {
348-
throw new InvalidArgument(sprintf('Missing parameter "QueueUrl" for "%s". The value cannot be null.', __CLASS__));
348+
throw new InvalidArgument(\sprintf('Missing parameter "QueueUrl" for "%s". The value cannot be null.', __CLASS__));
349349
}
350350
$payload['QueueUrl'] = $v;
351351
if (null !== $v = $this->attributeNames) {
352-
@trigger_error(sprintf('The property "AttributeNames" of "%s" is deprecated by AWS.', __CLASS__), \E_USER_DEPRECATED);
352+
@trigger_error(\sprintf('The property "AttributeNames" of "%s" is deprecated by AWS.', __CLASS__), \E_USER_DEPRECATED);
353353
$index = -1;
354354
$payload['AttributeNames'] = [];
355355
foreach ($v as $listValue) {
356356
++$index;
357357
if (!MessageSystemAttributeName::exists($listValue)) {
358-
throw new InvalidArgument(sprintf('Invalid parameter "AttributeNames" for "%s". The value "%s" is not a valid "MessageSystemAttributeName".', __CLASS__, $listValue));
358+
throw new InvalidArgument(\sprintf('Invalid parameter "AttributeNames" for "%s". The value "%s" is not a valid "MessageSystemAttributeName".', __CLASS__, $listValue));
359359
}
360360
$payload['AttributeNames'][$index] = $listValue;
361361
}
@@ -366,7 +366,7 @@ private function requestBody(): array
366366
foreach ($v as $listValue) {
367367
++$index;
368368
if (!MessageSystemAttributeName::exists($listValue)) {
369-
throw new InvalidArgument(sprintf('Invalid parameter "MessageSystemAttributeNames" for "%s". The value "%s" is not a valid "MessageSystemAttributeName".', __CLASS__, $listValue));
369+
throw new InvalidArgument(\sprintf('Invalid parameter "MessageSystemAttributeNames" for "%s". The value "%s" is not a valid "MessageSystemAttributeName".', __CLASS__, $listValue));
370370
}
371371
$payload['MessageSystemAttributeNames'][$index] = $listValue;
372372
}

src/Input/SendMessageBatchRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,11 @@ private function requestBody(): array
116116
{
117117
$payload = [];
118118
if (null === $v = $this->queueUrl) {
119-
throw new InvalidArgument(sprintf('Missing parameter "QueueUrl" for "%s". The value cannot be null.', __CLASS__));
119+
throw new InvalidArgument(\sprintf('Missing parameter "QueueUrl" for "%s". The value cannot be null.', __CLASS__));
120120
}
121121
$payload['QueueUrl'] = $v;
122122
if (null === $v = $this->entries) {
123-
throw new InvalidArgument(sprintf('Missing parameter "Entries" for "%s". The value cannot be null.', __CLASS__));
123+
throw new InvalidArgument(\sprintf('Missing parameter "Entries" for "%s". The value cannot be null.', __CLASS__));
124124
}
125125

126126
$index = -1;

src/Input/SendMessageRequest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,11 +329,11 @@ private function requestBody(): array
329329
{
330330
$payload = [];
331331
if (null === $v = $this->queueUrl) {
332-
throw new InvalidArgument(sprintf('Missing parameter "QueueUrl" for "%s". The value cannot be null.', __CLASS__));
332+
throw new InvalidArgument(\sprintf('Missing parameter "QueueUrl" for "%s". The value cannot be null.', __CLASS__));
333333
}
334334
$payload['QueueUrl'] = $v;
335335
if (null === $v = $this->messageBody) {
336-
throw new InvalidArgument(sprintf('Missing parameter "MessageBody" for "%s". The value cannot be null.', __CLASS__));
336+
throw new InvalidArgument(\sprintf('Missing parameter "MessageBody" for "%s". The value cannot be null.', __CLASS__));
337337
}
338338
$payload['MessageBody'] = $v;
339339
if (null !== $v = $this->delaySeconds) {
@@ -356,7 +356,7 @@ private function requestBody(): array
356356
$payload['MessageSystemAttributes'] = [];
357357
foreach ($v as $name => $mv) {
358358
if (!MessageSystemAttributeNameForSends::exists($name)) {
359-
throw new InvalidArgument(sprintf('Invalid key for "%s". The value "%s" is not a valid "MessageSystemAttributeNameForSends".', __CLASS__, $name));
359+
throw new InvalidArgument(\sprintf('Invalid key for "%s". The value "%s" is not a valid "MessageSystemAttributeNameForSends".', __CLASS__, $name));
360360
}
361361
$payload['MessageSystemAttributes'][$name] = $mv->requestBody();
362362
}

src/ValueObject/SendMessageBatchRequestEntry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ public function requestBody(): array
245245
$payload['MessageSystemAttributes'] = [];
246246
foreach ($v as $name => $mv) {
247247
if (!MessageSystemAttributeNameForSends::exists($name)) {
248-
throw new InvalidArgument(sprintf('Invalid key for "%s". The value "%s" is not a valid "MessageSystemAttributeNameForSends".', __CLASS__, $name));
248+
throw new InvalidArgument(\sprintf('Invalid key for "%s". The value "%s" is not a valid "MessageSystemAttributeNameForSends".', __CLASS__, $name));
249249
}
250250
$payload['MessageSystemAttributes'][$name] = $mv->requestBody();
251251
}

0 commit comments

Comments
 (0)