Skip to content

Commit

Permalink
Bump php-cs-fixer to version 3.60 (#1743)
Browse files Browse the repository at this point in the history
  • Loading branch information
jderusse authored Jul 30, 2024
1 parent 313b246 commit fd09f5e
Show file tree
Hide file tree
Showing 15 changed files with 36 additions and 32 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## NOT RELEASED

### Changed

- Enable compiler optimization for the `sprintf` function.

## 2.4.1

### Changed
Expand Down
2 changes: 1 addition & 1 deletion src/Input/BatchGetBuildsInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ private function requestBody(): array
{
$payload = [];
if (null === $v = $this->ids) {
throw new InvalidArgument(sprintf('Missing parameter "ids" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "ids" for "%s". The value cannot be null.', __CLASS__));
}

$index = -1;
Expand Down
10 changes: 5 additions & 5 deletions src/Input/StartBuildInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ private function requestBody(): array
{
$payload = [];
if (null === $v = $this->projectName) {
throw new InvalidArgument(sprintf('Missing parameter "projectName" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "projectName" for "%s". The value cannot be null.', __CLASS__));
}
$payload['projectName'] = $v;
if (null !== $v = $this->secondarySourcesOverride) {
Expand Down Expand Up @@ -956,7 +956,7 @@ private function requestBody(): array
}
if (null !== $v = $this->sourceTypeOverride) {
if (!SourceType::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "sourceTypeOverride" for "%s". The value "%s" is not a valid "SourceType".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "sourceTypeOverride" for "%s". The value "%s" is not a valid "SourceType".', __CLASS__, $v));
}
$payload['sourceTypeOverride'] = $v;
}
Expand Down Expand Up @@ -986,7 +986,7 @@ private function requestBody(): array
}
if (null !== $v = $this->environmentTypeOverride) {
if (!EnvironmentType::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "environmentTypeOverride" for "%s". The value "%s" is not a valid "EnvironmentType".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "environmentTypeOverride" for "%s". The value "%s" is not a valid "EnvironmentType".', __CLASS__, $v));
}
$payload['environmentTypeOverride'] = $v;
}
Expand All @@ -995,7 +995,7 @@ private function requestBody(): array
}
if (null !== $v = $this->computeTypeOverride) {
if (!ComputeType::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "computeTypeOverride" for "%s". The value "%s" is not a valid "ComputeType".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "computeTypeOverride" for "%s". The value "%s" is not a valid "ComputeType".', __CLASS__, $v));
}
$payload['computeTypeOverride'] = $v;
}
Expand Down Expand Up @@ -1031,7 +1031,7 @@ private function requestBody(): array
}
if (null !== $v = $this->imagePullCredentialsTypeOverride) {
if (!ImagePullCredentialsType::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "imagePullCredentialsTypeOverride" for "%s". The value "%s" is not a valid "ImagePullCredentialsType".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "imagePullCredentialsTypeOverride" for "%s". The value "%s" is not a valid "ImagePullCredentialsType".', __CLASS__, $v));
}
$payload['imagePullCredentialsTypeOverride'] = $v;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Input/StopBuildInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ private function requestBody(): array
{
$payload = [];
if (null === $v = $this->id) {
throw new InvalidArgument(sprintf('Missing parameter "id" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "id" for "%s". The value cannot be null.', __CLASS__));
}
$payload['id'] = $v;

Expand Down
8 changes: 4 additions & 4 deletions src/Result/BatchGetBuildsOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ private function populateResultBuild(array $json): Build
'id' => isset($json['id']) ? (string) $json['id'] : null,
'arn' => isset($json['arn']) ? (string) $json['arn'] : null,
'buildNumber' => isset($json['buildNumber']) ? (int) $json['buildNumber'] : null,
'startTime' => (isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['startTime'])))) ? $d : null,
'endTime' => (isset($json['endTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['endTime'])))) ? $d : null,
'startTime' => (isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['startTime'])))) ? $d : null,
'endTime' => (isset($json['endTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['endTime'])))) ? $d : null,
'currentPhase' => isset($json['currentPhase']) ? (string) $json['currentPhase'] : null,
'buildStatus' => isset($json['buildStatus']) ? (string) $json['buildStatus'] : null,
'sourceVersion' => isset($json['sourceVersion']) ? (string) $json['sourceVersion'] : null,
Expand Down Expand Up @@ -157,8 +157,8 @@ private function populateResultBuildPhase(array $json): BuildPhase
return new BuildPhase([
'phaseType' => isset($json['phaseType']) ? (string) $json['phaseType'] : null,
'phaseStatus' => isset($json['phaseStatus']) ? (string) $json['phaseStatus'] : null,
'startTime' => (isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['startTime'])))) ? $d : null,
'endTime' => (isset($json['endTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['endTime'])))) ? $d : null,
'startTime' => (isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['startTime'])))) ? $d : null,
'endTime' => (isset($json['endTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['endTime'])))) ? $d : null,
'durationInSeconds' => isset($json['durationInSeconds']) ? (int) $json['durationInSeconds'] : null,
'contexts' => !isset($json['contexts']) ? null : $this->populateResultPhaseContexts($json['contexts']),
]);
Expand Down
8 changes: 4 additions & 4 deletions src/Result/StartBuildOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ private function populateResultBuild(array $json): Build
'id' => isset($json['id']) ? (string) $json['id'] : null,
'arn' => isset($json['arn']) ? (string) $json['arn'] : null,
'buildNumber' => isset($json['buildNumber']) ? (int) $json['buildNumber'] : null,
'startTime' => (isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['startTime'])))) ? $d : null,
'endTime' => (isset($json['endTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['endTime'])))) ? $d : null,
'startTime' => (isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['startTime'])))) ? $d : null,
'endTime' => (isset($json['endTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['endTime'])))) ? $d : null,
'currentPhase' => isset($json['currentPhase']) ? (string) $json['currentPhase'] : null,
'buildStatus' => isset($json['buildStatus']) ? (string) $json['buildStatus'] : null,
'sourceVersion' => isset($json['sourceVersion']) ? (string) $json['sourceVersion'] : null,
Expand Down Expand Up @@ -120,8 +120,8 @@ private function populateResultBuildPhase(array $json): BuildPhase
return new BuildPhase([
'phaseType' => isset($json['phaseType']) ? (string) $json['phaseType'] : null,
'phaseStatus' => isset($json['phaseStatus']) ? (string) $json['phaseStatus'] : null,
'startTime' => (isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['startTime'])))) ? $d : null,
'endTime' => (isset($json['endTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['endTime'])))) ? $d : null,
'startTime' => (isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['startTime'])))) ? $d : null,
'endTime' => (isset($json['endTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['endTime'])))) ? $d : null,
'durationInSeconds' => isset($json['durationInSeconds']) ? (int) $json['durationInSeconds'] : null,
'contexts' => !isset($json['contexts']) ? null : $this->populateResultPhaseContexts($json['contexts']),
]);
Expand Down
8 changes: 4 additions & 4 deletions src/Result/StopBuildOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ private function populateResultBuild(array $json): Build
'id' => isset($json['id']) ? (string) $json['id'] : null,
'arn' => isset($json['arn']) ? (string) $json['arn'] : null,
'buildNumber' => isset($json['buildNumber']) ? (int) $json['buildNumber'] : null,
'startTime' => (isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['startTime'])))) ? $d : null,
'endTime' => (isset($json['endTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['endTime'])))) ? $d : null,
'startTime' => (isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['startTime'])))) ? $d : null,
'endTime' => (isset($json['endTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['endTime'])))) ? $d : null,
'currentPhase' => isset($json['currentPhase']) ? (string) $json['currentPhase'] : null,
'buildStatus' => isset($json['buildStatus']) ? (string) $json['buildStatus'] : null,
'sourceVersion' => isset($json['sourceVersion']) ? (string) $json['sourceVersion'] : null,
Expand Down Expand Up @@ -120,8 +120,8 @@ private function populateResultBuildPhase(array $json): BuildPhase
return new BuildPhase([
'phaseType' => isset($json['phaseType']) ? (string) $json['phaseType'] : null,
'phaseStatus' => isset($json['phaseStatus']) ? (string) $json['phaseStatus'] : null,
'startTime' => (isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['startTime'])))) ? $d : null,
'endTime' => (isset($json['endTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['endTime'])))) ? $d : null,
'startTime' => (isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['startTime'])))) ? $d : null,
'endTime' => (isset($json['endTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['endTime'])))) ? $d : null,
'durationInSeconds' => isset($json['durationInSeconds']) ? (int) $json['durationInSeconds'] : null,
'contexts' => !isset($json['contexts']) ? null : $this->populateResultPhaseContexts($json['contexts']),
]);
Expand Down
2 changes: 1 addition & 1 deletion src/ValueObject/CloudWatchLogsConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function requestBody(): array
$payload = [];
$v = $this->status;
if (!LogsConfigStatusType::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "status" for "%s". The value "%s" is not a valid "LogsConfigStatusType".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "status" for "%s". The value "%s" is not a valid "LogsConfigStatusType".', __CLASS__, $v));
}
$payload['status'] = $v;
if (null !== $v = $this->groupName) {
Expand Down
2 changes: 1 addition & 1 deletion src/ValueObject/EnvironmentVariable.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function requestBody(): array
$payload['value'] = $v;
if (null !== $v = $this->type) {
if (!EnvironmentVariableType::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "type" for "%s". The value "%s" is not a valid "EnvironmentVariableType".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "type" for "%s". The value "%s" is not a valid "EnvironmentVariableType".', __CLASS__, $v));
}
$payload['type'] = $v;
}
Expand Down
8 changes: 4 additions & 4 deletions src/ValueObject/ProjectArtifacts.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ public function requestBody(): array
$payload = [];
$v = $this->type;
if (!ArtifactsType::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "type" for "%s". The value "%s" is not a valid "ArtifactsType".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "type" for "%s". The value "%s" is not a valid "ArtifactsType".', __CLASS__, $v));
}
$payload['type'] = $v;
if (null !== $v = $this->location) {
Expand All @@ -269,7 +269,7 @@ public function requestBody(): array
}
if (null !== $v = $this->namespaceType) {
if (!ArtifactNamespace::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "namespaceType" for "%s". The value "%s" is not a valid "ArtifactNamespace".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "namespaceType" for "%s". The value "%s" is not a valid "ArtifactNamespace".', __CLASS__, $v));
}
$payload['namespaceType'] = $v;
}
Expand All @@ -278,7 +278,7 @@ public function requestBody(): array
}
if (null !== $v = $this->packaging) {
if (!ArtifactPackaging::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "packaging" for "%s". The value "%s" is not a valid "ArtifactPackaging".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "packaging" for "%s". The value "%s" is not a valid "ArtifactPackaging".', __CLASS__, $v));
}
$payload['packaging'] = $v;
}
Expand All @@ -293,7 +293,7 @@ public function requestBody(): array
}
if (null !== $v = $this->bucketOwnerAccess) {
if (!BucketOwnerAccess::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "bucketOwnerAccess" for "%s". The value "%s" is not a valid "BucketOwnerAccess".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "bucketOwnerAccess" for "%s". The value "%s" is not a valid "BucketOwnerAccess".', __CLASS__, $v));
}
$payload['bucketOwnerAccess'] = $v;
}
Expand Down
4 changes: 2 additions & 2 deletions src/ValueObject/ProjectCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public function requestBody(): array
$payload = [];
$v = $this->type;
if (!CacheType::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "type" for "%s". The value "%s" is not a valid "CacheType".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "type" for "%s". The value "%s" is not a valid "CacheType".', __CLASS__, $v));
}
$payload['type'] = $v;
if (null !== $v = $this->location) {
Expand All @@ -135,7 +135,7 @@ public function requestBody(): array
foreach ($v as $listValue) {
++$index;
if (!CacheMode::exists($listValue)) {
throw new InvalidArgument(sprintf('Invalid parameter "modes" for "%s". The value "%s" is not a valid "CacheMode".', __CLASS__, $listValue));
throw new InvalidArgument(\sprintf('Invalid parameter "modes" for "%s". The value "%s" is not a valid "CacheMode".', __CLASS__, $listValue));
}
$payload['modes'][$index] = $listValue;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ValueObject/ProjectSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ public function requestBody(): array
$payload = [];
$v = $this->type;
if (!SourceType::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "type" for "%s". The value "%s" is not a valid "SourceType".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "type" for "%s". The value "%s" is not a valid "SourceType".', __CLASS__, $v));
}
$payload['type'] = $v;
if (null !== $v = $this->location) {
Expand Down
2 changes: 1 addition & 1 deletion src/ValueObject/RegistryCredential.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function requestBody(): array
$payload['credential'] = $v;
$v = $this->credentialProvider;
if (!CredentialProviderType::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "credentialProvider" for "%s". The value "%s" is not a valid "CredentialProviderType".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "credentialProvider" for "%s". The value "%s" is not a valid "CredentialProviderType".', __CLASS__, $v));
}
$payload['credentialProvider'] = $v;

Expand Down
4 changes: 2 additions & 2 deletions src/ValueObject/S3LogsConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function requestBody(): array
$payload = [];
$v = $this->status;
if (!LogsConfigStatusType::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "status" for "%s". The value "%s" is not a valid "LogsConfigStatusType".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "status" for "%s". The value "%s" is not a valid "LogsConfigStatusType".', __CLASS__, $v));
}
$payload['status'] = $v;
if (null !== $v = $this->location) {
Expand All @@ -115,7 +115,7 @@ public function requestBody(): array
}
if (null !== $v = $this->bucketOwnerAccess) {
if (!BucketOwnerAccess::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "bucketOwnerAccess" for "%s". The value "%s" is not a valid "BucketOwnerAccess".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "bucketOwnerAccess" for "%s". The value "%s" is not a valid "BucketOwnerAccess".', __CLASS__, $v));
}
$payload['bucketOwnerAccess'] = $v;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ValueObject/SourceAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function requestBody(): array
$payload = [];
$v = $this->type;
if (!SourceAuthType::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "type" for "%s". The value "%s" is not a valid "SourceAuthType".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "type" for "%s". The value "%s" is not a valid "SourceAuthType".', __CLASS__, $v));
}
$payload['type'] = $v;
if (null !== $v = $this->resource) {
Expand Down

0 comments on commit fd09f5e

Please sign in to comment.