Skip to content

Commit 92eae24

Browse files
authored
Bump php-cs-fixer to version 3.60 (#1743)
1 parent 56e1ac9 commit 92eae24

10 files changed

+19
-15
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
- AWS api-change: CreateRepository API now throws OperationNotAllowedException when the account has been restricted from creating a repository.
88

9+
### Changed
10+
11+
- Enable compiler optimization for the `sprintf` function.
12+
913
## 1.1.2
1014

1115
### Changed

src/Input/CreateRepositoryInput.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ private function requestBody(): array
176176
{
177177
$payload = [];
178178
if (null === $v = $this->repositoryName) {
179-
throw new InvalidArgument(sprintf('Missing parameter "repositoryName" for "%s". The value cannot be null.', __CLASS__));
179+
throw new InvalidArgument(\sprintf('Missing parameter "repositoryName" for "%s". The value cannot be null.', __CLASS__));
180180
}
181181
$payload['repositoryName'] = $v;
182182
if (null !== $v = $this->repositoryDescription) {

src/Input/DeleteRepositoryInput.php

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

src/Input/GetBlobInput.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ private function requestBody(): array
110110
{
111111
$payload = [];
112112
if (null === $v = $this->repositoryName) {
113-
throw new InvalidArgument(sprintf('Missing parameter "repositoryName" for "%s". The value cannot be null.', __CLASS__));
113+
throw new InvalidArgument(\sprintf('Missing parameter "repositoryName" for "%s". The value cannot be null.', __CLASS__));
114114
}
115115
$payload['repositoryName'] = $v;
116116
if (null === $v = $this->blobId) {
117-
throw new InvalidArgument(sprintf('Missing parameter "blobId" for "%s". The value cannot be null.', __CLASS__));
117+
throw new InvalidArgument(\sprintf('Missing parameter "blobId" for "%s". The value cannot be null.', __CLASS__));
118118
}
119119
$payload['blobId'] = $v;
120120

src/Input/GetCommitInput.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ private function requestBody(): array
110110
{
111111
$payload = [];
112112
if (null === $v = $this->repositoryName) {
113-
throw new InvalidArgument(sprintf('Missing parameter "repositoryName" for "%s". The value cannot be null.', __CLASS__));
113+
throw new InvalidArgument(\sprintf('Missing parameter "repositoryName" for "%s". The value cannot be null.', __CLASS__));
114114
}
115115
$payload['repositoryName'] = $v;
116116
if (null === $v = $this->commitId) {
117-
throw new InvalidArgument(sprintf('Missing parameter "commitId" for "%s". The value cannot be null.', __CLASS__));
117+
throw new InvalidArgument(\sprintf('Missing parameter "commitId" for "%s". The value cannot be null.', __CLASS__));
118118
}
119119
$payload['commitId'] = $v;
120120

src/Input/GetDifferencesInput.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -222,14 +222,14 @@ private function requestBody(): array
222222
{
223223
$payload = [];
224224
if (null === $v = $this->repositoryName) {
225-
throw new InvalidArgument(sprintf('Missing parameter "repositoryName" for "%s". The value cannot be null.', __CLASS__));
225+
throw new InvalidArgument(\sprintf('Missing parameter "repositoryName" for "%s". The value cannot be null.', __CLASS__));
226226
}
227227
$payload['repositoryName'] = $v;
228228
if (null !== $v = $this->beforeCommitSpecifier) {
229229
$payload['beforeCommitSpecifier'] = $v;
230230
}
231231
if (null === $v = $this->afterCommitSpecifier) {
232-
throw new InvalidArgument(sprintf('Missing parameter "afterCommitSpecifier" for "%s". The value cannot be null.', __CLASS__));
232+
throw new InvalidArgument(\sprintf('Missing parameter "afterCommitSpecifier" for "%s". The value cannot be null.', __CLASS__));
233233
}
234234
$payload['afterCommitSpecifier'] = $v;
235235
if (null !== $v = $this->beforePath) {

src/Input/ListRepositoriesInput.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,13 @@ private function requestBody(): array
148148
}
149149
if (null !== $v = $this->sortBy) {
150150
if (!SortByEnum::exists($v)) {
151-
throw new InvalidArgument(sprintf('Invalid parameter "sortBy" for "%s". The value "%s" is not a valid "SortByEnum".', __CLASS__, $v));
151+
throw new InvalidArgument(\sprintf('Invalid parameter "sortBy" for "%s". The value "%s" is not a valid "SortByEnum".', __CLASS__, $v));
152152
}
153153
$payload['sortBy'] = $v;
154154
}
155155
if (null !== $v = $this->order) {
156156
if (!OrderEnum::exists($v)) {
157-
throw new InvalidArgument(sprintf('Invalid parameter "order" for "%s". The value "%s" is not a valid "OrderEnum".', __CLASS__, $v));
157+
throw new InvalidArgument(\sprintf('Invalid parameter "order" for "%s". The value "%s" is not a valid "OrderEnum".', __CLASS__, $v));
158158
}
159159
$payload['order'] = $v;
160160
}

src/Input/PutRepositoryTriggersInput.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,11 @@ private function requestBody(): array
117117
{
118118
$payload = [];
119119
if (null === $v = $this->repositoryName) {
120-
throw new InvalidArgument(sprintf('Missing parameter "repositoryName" for "%s". The value cannot be null.', __CLASS__));
120+
throw new InvalidArgument(\sprintf('Missing parameter "repositoryName" for "%s". The value cannot be null.', __CLASS__));
121121
}
122122
$payload['repositoryName'] = $v;
123123
if (null === $v = $this->triggers) {
124-
throw new InvalidArgument(sprintf('Missing parameter "triggers" for "%s". The value cannot be null.', __CLASS__));
124+
throw new InvalidArgument(\sprintf('Missing parameter "triggers" for "%s". The value cannot be null.', __CLASS__));
125125
}
126126

127127
$index = -1;

src/Result/CreateRepositoryOutput.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ private function populateResultRepositoryMetadata(array $json): RepositoryMetada
4040
'repositoryName' => isset($json['repositoryName']) ? (string) $json['repositoryName'] : null,
4141
'repositoryDescription' => isset($json['repositoryDescription']) ? (string) $json['repositoryDescription'] : null,
4242
'defaultBranch' => isset($json['defaultBranch']) ? (string) $json['defaultBranch'] : null,
43-
'lastModifiedDate' => (isset($json['lastModifiedDate']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['lastModifiedDate'])))) ? $d : null,
44-
'creationDate' => (isset($json['creationDate']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['creationDate'])))) ? $d : null,
43+
'lastModifiedDate' => (isset($json['lastModifiedDate']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['lastModifiedDate'])))) ? $d : null,
44+
'creationDate' => (isset($json['creationDate']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['creationDate'])))) ? $d : null,
4545
'cloneUrlHttp' => isset($json['cloneUrlHttp']) ? (string) $json['cloneUrlHttp'] : null,
4646
'cloneUrlSsh' => isset($json['cloneUrlSsh']) ? (string) $json['cloneUrlSsh'] : null,
4747
'Arn' => isset($json['Arn']) ? (string) $json['Arn'] : null,

src/ValueObject/RepositoryTrigger.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public function requestBody(): array
147147
foreach ($v as $listValue) {
148148
++$index;
149149
if (!RepositoryTriggerEventEnum::exists($listValue)) {
150-
throw new InvalidArgument(sprintf('Invalid parameter "events" for "%s". The value "%s" is not a valid "RepositoryTriggerEventEnum".', __CLASS__, $listValue));
150+
throw new InvalidArgument(\sprintf('Invalid parameter "events" for "%s". The value "%s" is not a valid "RepositoryTriggerEventEnum".', __CLASS__, $listValue));
151151
}
152152
$payload['events'][$index] = $listValue;
153153
}

0 commit comments

Comments
 (0)