Skip to content
  • Sponsor async-aws/code-build

  • Notifications You must be signed in to change notification settings
  • Fork 0

Commit fd09f5e

Browse files
authoredJul 30, 2024··
Bump php-cs-fixer to version 3.60 (#1743)
1 parent 313b246 commit fd09f5e

15 files changed

+36
-32
lines changed
 

‎CHANGELOG.md

+4
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.4.1
610

711
### Changed

‎src/Input/BatchGetBuildsInput.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ private function requestBody(): array
8989
{
9090
$payload = [];
9191
if (null === $v = $this->ids) {
92-
throw new InvalidArgument(sprintf('Missing parameter "ids" for "%s". The value cannot be null.', __CLASS__));
92+
throw new InvalidArgument(\sprintf('Missing parameter "ids" for "%s". The value cannot be null.', __CLASS__));
9393
}
9494

9595
$index = -1;

‎src/Input/StartBuildInput.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ private function requestBody(): array
913913
{
914914
$payload = [];
915915
if (null === $v = $this->projectName) {
916-
throw new InvalidArgument(sprintf('Missing parameter "projectName" for "%s". The value cannot be null.', __CLASS__));
916+
throw new InvalidArgument(\sprintf('Missing parameter "projectName" for "%s". The value cannot be null.', __CLASS__));
917917
}
918918
$payload['projectName'] = $v;
919919
if (null !== $v = $this->secondarySourcesOverride) {
@@ -956,7 +956,7 @@ private function requestBody(): array
956956
}
957957
if (null !== $v = $this->sourceTypeOverride) {
958958
if (!SourceType::exists($v)) {
959-
throw new InvalidArgument(sprintf('Invalid parameter "sourceTypeOverride" for "%s". The value "%s" is not a valid "SourceType".', __CLASS__, $v));
959+
throw new InvalidArgument(\sprintf('Invalid parameter "sourceTypeOverride" for "%s". The value "%s" is not a valid "SourceType".', __CLASS__, $v));
960960
}
961961
$payload['sourceTypeOverride'] = $v;
962962
}
@@ -986,7 +986,7 @@ private function requestBody(): array
986986
}
987987
if (null !== $v = $this->environmentTypeOverride) {
988988
if (!EnvironmentType::exists($v)) {
989-
throw new InvalidArgument(sprintf('Invalid parameter "environmentTypeOverride" for "%s". The value "%s" is not a valid "EnvironmentType".', __CLASS__, $v));
989+
throw new InvalidArgument(\sprintf('Invalid parameter "environmentTypeOverride" for "%s". The value "%s" is not a valid "EnvironmentType".', __CLASS__, $v));
990990
}
991991
$payload['environmentTypeOverride'] = $v;
992992
}
@@ -995,7 +995,7 @@ private function requestBody(): array
995995
}
996996
if (null !== $v = $this->computeTypeOverride) {
997997
if (!ComputeType::exists($v)) {
998-
throw new InvalidArgument(sprintf('Invalid parameter "computeTypeOverride" for "%s". The value "%s" is not a valid "ComputeType".', __CLASS__, $v));
998+
throw new InvalidArgument(\sprintf('Invalid parameter "computeTypeOverride" for "%s". The value "%s" is not a valid "ComputeType".', __CLASS__, $v));
999999
}
10001000
$payload['computeTypeOverride'] = $v;
10011001
}
@@ -1031,7 +1031,7 @@ private function requestBody(): array
10311031
}
10321032
if (null !== $v = $this->imagePullCredentialsTypeOverride) {
10331033
if (!ImagePullCredentialsType::exists($v)) {
1034-
throw new InvalidArgument(sprintf('Invalid parameter "imagePullCredentialsTypeOverride" for "%s". The value "%s" is not a valid "ImagePullCredentialsType".', __CLASS__, $v));
1034+
throw new InvalidArgument(\sprintf('Invalid parameter "imagePullCredentialsTypeOverride" for "%s". The value "%s" is not a valid "ImagePullCredentialsType".', __CLASS__, $v));
10351035
}
10361036
$payload['imagePullCredentialsTypeOverride'] = $v;
10371037
}

‎src/Input/StopBuildInput.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ private function requestBody(): array
8383
{
8484
$payload = [];
8585
if (null === $v = $this->id) {
86-
throw new InvalidArgument(sprintf('Missing parameter "id" for "%s". The value cannot be null.', __CLASS__));
86+
throw new InvalidArgument(\sprintf('Missing parameter "id" for "%s". The value cannot be null.', __CLASS__));
8787
}
8888
$payload['id'] = $v;
8989

‎src/Result/BatchGetBuildsOutput.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ private function populateResultBuild(array $json): Build
7878
'id' => isset($json['id']) ? (string) $json['id'] : null,
7979
'arn' => isset($json['arn']) ? (string) $json['arn'] : null,
8080
'buildNumber' => isset($json['buildNumber']) ? (int) $json['buildNumber'] : null,
81-
'startTime' => (isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['startTime'])))) ? $d : null,
82-
'endTime' => (isset($json['endTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['endTime'])))) ? $d : null,
81+
'startTime' => (isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['startTime'])))) ? $d : null,
82+
'endTime' => (isset($json['endTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['endTime'])))) ? $d : null,
8383
'currentPhase' => isset($json['currentPhase']) ? (string) $json['currentPhase'] : null,
8484
'buildStatus' => isset($json['buildStatus']) ? (string) $json['buildStatus'] : null,
8585
'sourceVersion' => isset($json['sourceVersion']) ? (string) $json['sourceVersion'] : null,
@@ -157,8 +157,8 @@ private function populateResultBuildPhase(array $json): BuildPhase
157157
return new BuildPhase([
158158
'phaseType' => isset($json['phaseType']) ? (string) $json['phaseType'] : null,
159159
'phaseStatus' => isset($json['phaseStatus']) ? (string) $json['phaseStatus'] : null,
160-
'startTime' => (isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['startTime'])))) ? $d : null,
161-
'endTime' => (isset($json['endTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['endTime'])))) ? $d : null,
160+
'startTime' => (isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['startTime'])))) ? $d : null,
161+
'endTime' => (isset($json['endTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['endTime'])))) ? $d : null,
162162
'durationInSeconds' => isset($json['durationInSeconds']) ? (int) $json['durationInSeconds'] : null,
163163
'contexts' => !isset($json['contexts']) ? null : $this->populateResultPhaseContexts($json['contexts']),
164164
]);

‎src/Result/StartBuildOutput.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ private function populateResultBuild(array $json): Build
5757
'id' => isset($json['id']) ? (string) $json['id'] : null,
5858
'arn' => isset($json['arn']) ? (string) $json['arn'] : null,
5959
'buildNumber' => isset($json['buildNumber']) ? (int) $json['buildNumber'] : null,
60-
'startTime' => (isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['startTime'])))) ? $d : null,
61-
'endTime' => (isset($json['endTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['endTime'])))) ? $d : null,
60+
'startTime' => (isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['startTime'])))) ? $d : null,
61+
'endTime' => (isset($json['endTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['endTime'])))) ? $d : null,
6262
'currentPhase' => isset($json['currentPhase']) ? (string) $json['currentPhase'] : null,
6363
'buildStatus' => isset($json['buildStatus']) ? (string) $json['buildStatus'] : null,
6464
'sourceVersion' => isset($json['sourceVersion']) ? (string) $json['sourceVersion'] : null,
@@ -120,8 +120,8 @@ private function populateResultBuildPhase(array $json): BuildPhase
120120
return new BuildPhase([
121121
'phaseType' => isset($json['phaseType']) ? (string) $json['phaseType'] : null,
122122
'phaseStatus' => isset($json['phaseStatus']) ? (string) $json['phaseStatus'] : null,
123-
'startTime' => (isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['startTime'])))) ? $d : null,
124-
'endTime' => (isset($json['endTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['endTime'])))) ? $d : null,
123+
'startTime' => (isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['startTime'])))) ? $d : null,
124+
'endTime' => (isset($json['endTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['endTime'])))) ? $d : null,
125125
'durationInSeconds' => isset($json['durationInSeconds']) ? (int) $json['durationInSeconds'] : null,
126126
'contexts' => !isset($json['contexts']) ? null : $this->populateResultPhaseContexts($json['contexts']),
127127
]);

‎src/Result/StopBuildOutput.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ private function populateResultBuild(array $json): Build
5757
'id' => isset($json['id']) ? (string) $json['id'] : null,
5858
'arn' => isset($json['arn']) ? (string) $json['arn'] : null,
5959
'buildNumber' => isset($json['buildNumber']) ? (int) $json['buildNumber'] : null,
60-
'startTime' => (isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['startTime'])))) ? $d : null,
61-
'endTime' => (isset($json['endTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['endTime'])))) ? $d : null,
60+
'startTime' => (isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['startTime'])))) ? $d : null,
61+
'endTime' => (isset($json['endTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['endTime'])))) ? $d : null,
6262
'currentPhase' => isset($json['currentPhase']) ? (string) $json['currentPhase'] : null,
6363
'buildStatus' => isset($json['buildStatus']) ? (string) $json['buildStatus'] : null,
6464
'sourceVersion' => isset($json['sourceVersion']) ? (string) $json['sourceVersion'] : null,
@@ -120,8 +120,8 @@ private function populateResultBuildPhase(array $json): BuildPhase
120120
return new BuildPhase([
121121
'phaseType' => isset($json['phaseType']) ? (string) $json['phaseType'] : null,
122122
'phaseStatus' => isset($json['phaseStatus']) ? (string) $json['phaseStatus'] : null,
123-
'startTime' => (isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['startTime'])))) ? $d : null,
124-
'endTime' => (isset($json['endTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['endTime'])))) ? $d : null,
123+
'startTime' => (isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['startTime'])))) ? $d : null,
124+
'endTime' => (isset($json['endTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['endTime'])))) ? $d : null,
125125
'durationInSeconds' => isset($json['durationInSeconds']) ? (int) $json['durationInSeconds'] : null,
126126
'contexts' => !isset($json['contexts']) ? null : $this->populateResultPhaseContexts($json['contexts']),
127127
]);

‎src/ValueObject/CloudWatchLogsConfig.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function requestBody(): array
9292
$payload = [];
9393
$v = $this->status;
9494
if (!LogsConfigStatusType::exists($v)) {
95-
throw new InvalidArgument(sprintf('Invalid parameter "status" for "%s". The value "%s" is not a valid "LogsConfigStatusType".', __CLASS__, $v));
95+
throw new InvalidArgument(\sprintf('Invalid parameter "status" for "%s". The value "%s" is not a valid "LogsConfigStatusType".', __CLASS__, $v));
9696
}
9797
$payload['status'] = $v;
9898
if (null !== $v = $this->groupName) {

‎src/ValueObject/EnvironmentVariable.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function requestBody(): array
105105
$payload['value'] = $v;
106106
if (null !== $v = $this->type) {
107107
if (!EnvironmentVariableType::exists($v)) {
108-
throw new InvalidArgument(sprintf('Invalid parameter "type" for "%s". The value "%s" is not a valid "EnvironmentVariableType".', __CLASS__, $v));
108+
throw new InvalidArgument(\sprintf('Invalid parameter "type" for "%s". The value "%s" is not a valid "EnvironmentVariableType".', __CLASS__, $v));
109109
}
110110
$payload['type'] = $v;
111111
}

‎src/ValueObject/ProjectArtifacts.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ public function requestBody(): array
258258
$payload = [];
259259
$v = $this->type;
260260
if (!ArtifactsType::exists($v)) {
261-
throw new InvalidArgument(sprintf('Invalid parameter "type" for "%s". The value "%s" is not a valid "ArtifactsType".', __CLASS__, $v));
261+
throw new InvalidArgument(\sprintf('Invalid parameter "type" for "%s". The value "%s" is not a valid "ArtifactsType".', __CLASS__, $v));
262262
}
263263
$payload['type'] = $v;
264264
if (null !== $v = $this->location) {
@@ -269,7 +269,7 @@ public function requestBody(): array
269269
}
270270
if (null !== $v = $this->namespaceType) {
271271
if (!ArtifactNamespace::exists($v)) {
272-
throw new InvalidArgument(sprintf('Invalid parameter "namespaceType" for "%s". The value "%s" is not a valid "ArtifactNamespace".', __CLASS__, $v));
272+
throw new InvalidArgument(\sprintf('Invalid parameter "namespaceType" for "%s". The value "%s" is not a valid "ArtifactNamespace".', __CLASS__, $v));
273273
}
274274
$payload['namespaceType'] = $v;
275275
}
@@ -278,7 +278,7 @@ public function requestBody(): array
278278
}
279279
if (null !== $v = $this->packaging) {
280280
if (!ArtifactPackaging::exists($v)) {
281-
throw new InvalidArgument(sprintf('Invalid parameter "packaging" for "%s". The value "%s" is not a valid "ArtifactPackaging".', __CLASS__, $v));
281+
throw new InvalidArgument(\sprintf('Invalid parameter "packaging" for "%s". The value "%s" is not a valid "ArtifactPackaging".', __CLASS__, $v));
282282
}
283283
$payload['packaging'] = $v;
284284
}
@@ -293,7 +293,7 @@ public function requestBody(): array
293293
}
294294
if (null !== $v = $this->bucketOwnerAccess) {
295295
if (!BucketOwnerAccess::exists($v)) {
296-
throw new InvalidArgument(sprintf('Invalid parameter "bucketOwnerAccess" for "%s". The value "%s" is not a valid "BucketOwnerAccess".', __CLASS__, $v));
296+
throw new InvalidArgument(\sprintf('Invalid parameter "bucketOwnerAccess" for "%s". The value "%s" is not a valid "BucketOwnerAccess".', __CLASS__, $v));
297297
}
298298
$payload['bucketOwnerAccess'] = $v;
299299
}

‎src/ValueObject/ProjectCache.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function requestBody(): array
123123
$payload = [];
124124
$v = $this->type;
125125
if (!CacheType::exists($v)) {
126-
throw new InvalidArgument(sprintf('Invalid parameter "type" for "%s". The value "%s" is not a valid "CacheType".', __CLASS__, $v));
126+
throw new InvalidArgument(\sprintf('Invalid parameter "type" for "%s". The value "%s" is not a valid "CacheType".', __CLASS__, $v));
127127
}
128128
$payload['type'] = $v;
129129
if (null !== $v = $this->location) {
@@ -135,7 +135,7 @@ public function requestBody(): array
135135
foreach ($v as $listValue) {
136136
++$index;
137137
if (!CacheMode::exists($listValue)) {
138-
throw new InvalidArgument(sprintf('Invalid parameter "modes" for "%s". The value "%s" is not a valid "CacheMode".', __CLASS__, $listValue));
138+
throw new InvalidArgument(\sprintf('Invalid parameter "modes" for "%s". The value "%s" is not a valid "CacheMode".', __CLASS__, $listValue));
139139
}
140140
$payload['modes'][$index] = $listValue;
141141
}

‎src/ValueObject/ProjectSource.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ public function requestBody(): array
262262
$payload = [];
263263
$v = $this->type;
264264
if (!SourceType::exists($v)) {
265-
throw new InvalidArgument(sprintf('Invalid parameter "type" for "%s". The value "%s" is not a valid "SourceType".', __CLASS__, $v));
265+
throw new InvalidArgument(\sprintf('Invalid parameter "type" for "%s". The value "%s" is not a valid "SourceType".', __CLASS__, $v));
266266
}
267267
$payload['type'] = $v;
268268
if (null !== $v = $this->location) {

‎src/ValueObject/RegistryCredential.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function requestBody(): array
8080
$payload['credential'] = $v;
8181
$v = $this->credentialProvider;
8282
if (!CredentialProviderType::exists($v)) {
83-
throw new InvalidArgument(sprintf('Invalid parameter "credentialProvider" for "%s". The value "%s" is not a valid "CredentialProviderType".', __CLASS__, $v));
83+
throw new InvalidArgument(\sprintf('Invalid parameter "credentialProvider" for "%s". The value "%s" is not a valid "CredentialProviderType".', __CLASS__, $v));
8484
}
8585
$payload['credentialProvider'] = $v;
8686

‎src/ValueObject/S3LogsConfig.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function requestBody(): array
104104
$payload = [];
105105
$v = $this->status;
106106
if (!LogsConfigStatusType::exists($v)) {
107-
throw new InvalidArgument(sprintf('Invalid parameter "status" for "%s". The value "%s" is not a valid "LogsConfigStatusType".', __CLASS__, $v));
107+
throw new InvalidArgument(\sprintf('Invalid parameter "status" for "%s". The value "%s" is not a valid "LogsConfigStatusType".', __CLASS__, $v));
108108
}
109109
$payload['status'] = $v;
110110
if (null !== $v = $this->location) {
@@ -115,7 +115,7 @@ public function requestBody(): array
115115
}
116116
if (null !== $v = $this->bucketOwnerAccess) {
117117
if (!BucketOwnerAccess::exists($v)) {
118-
throw new InvalidArgument(sprintf('Invalid parameter "bucketOwnerAccess" for "%s". The value "%s" is not a valid "BucketOwnerAccess".', __CLASS__, $v));
118+
throw new InvalidArgument(\sprintf('Invalid parameter "bucketOwnerAccess" for "%s". The value "%s" is not a valid "BucketOwnerAccess".', __CLASS__, $v));
119119
}
120120
$payload['bucketOwnerAccess'] = $v;
121121
}

‎src/ValueObject/SourceAuth.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function requestBody(): array
7070
$payload = [];
7171
$v = $this->type;
7272
if (!SourceAuthType::exists($v)) {
73-
throw new InvalidArgument(sprintf('Invalid parameter "type" for "%s". The value "%s" is not a valid "SourceAuthType".', __CLASS__, $v));
73+
throw new InvalidArgument(\sprintf('Invalid parameter "type" for "%s". The value "%s" is not a valid "SourceAuthType".', __CLASS__, $v));
7474
}
7575
$payload['type'] = $v;
7676
if (null !== $v = $this->resource) {

0 commit comments

Comments
 (0)
Please sign in to comment.