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 4a19789 commit 682d8b9
Show file tree
Hide file tree
Showing 105 changed files with 449 additions and 445 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.

## 1.3.0

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/Input/CancelJobRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function request(): Request
// Prepare URI
$uri = [];
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__));
}
$uri['id'] = $v;
$uriString = '/2017-08-29/jobs/' . rawurlencode($uri['id']);
Expand Down
10 changes: 5 additions & 5 deletions src/Input/CreateJobRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ private function requestBody(): array
}
if (null !== $v = $this->billingTagsSource) {
if (!BillingTagsSource::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "billingTagsSource" for "%s". The value "%s" is not a valid "BillingTagsSource".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "billingTagsSource" for "%s". The value "%s" is not a valid "BillingTagsSource".', __CLASS__, $v));
}
$payload['billingTagsSource'] = $v;
}
Expand All @@ -448,22 +448,22 @@ private function requestBody(): array
$payload['queue'] = $v;
}
if (null === $v = $this->role) {
throw new InvalidArgument(sprintf('Missing parameter "Role" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "Role" for "%s". The value cannot be null.', __CLASS__));
}
$payload['role'] = $v;
if (null === $v = $this->settings) {
throw new InvalidArgument(sprintf('Missing parameter "Settings" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "Settings" for "%s". The value cannot be null.', __CLASS__));
}
$payload['settings'] = $v->requestBody();
if (null !== $v = $this->simulateReservedQueue) {
if (!SimulateReservedQueue::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "simulateReservedQueue" for "%s". The value "%s" is not a valid "SimulateReservedQueue".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "simulateReservedQueue" for "%s". The value "%s" is not a valid "SimulateReservedQueue".', __CLASS__, $v));
}
$payload['simulateReservedQueue'] = $v;
}
if (null !== $v = $this->statusUpdateInterval) {
if (!StatusUpdateInterval::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "statusUpdateInterval" for "%s". The value "%s" is not a valid "StatusUpdateInterval".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "statusUpdateInterval" for "%s". The value "%s" is not a valid "StatusUpdateInterval".', __CLASS__, $v));
}
$payload['statusUpdateInterval'] = $v;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Input/DescribeEndpointsRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ private function requestBody(): array
}
if (null !== $v = $this->mode) {
if (!DescribeEndpointsMode::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "mode" for "%s". The value "%s" is not a valid "DescribeEndpointsMode".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "mode" for "%s". The value "%s" is not a valid "DescribeEndpointsMode".', __CLASS__, $v));
}
$payload['mode'] = $v;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Input/GetJobRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function request(): Request
// Prepare URI
$uri = [];
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__));
}
$uri['id'] = $v;
$uriString = '/2017-08-29/jobs/' . rawurlencode($uri['id']);
Expand Down
4 changes: 2 additions & 2 deletions src/Input/ListJobsRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public function request(): Request
}
if (null !== $this->order) {
if (!Order::exists($this->order)) {
throw new InvalidArgument(sprintf('Invalid parameter "Order" for "%s". The value "%s" is not a valid "Order".', __CLASS__, $this->order));
throw new InvalidArgument(\sprintf('Invalid parameter "Order" for "%s". The value "%s" is not a valid "Order".', __CLASS__, $this->order));
}
$query['order'] = $this->order;
}
Expand All @@ -148,7 +148,7 @@ public function request(): Request
}
if (null !== $this->status) {
if (!JobStatus::exists($this->status)) {
throw new InvalidArgument(sprintf('Invalid parameter "Status" for "%s". The value "%s" is not a valid "JobStatus".', __CLASS__, $this->status));
throw new InvalidArgument(\sprintf('Invalid parameter "Status" for "%s". The value "%s" is not a valid "JobStatus".', __CLASS__, $this->status));
}
$query['status'] = $this->status;
}
Expand Down
2 changes: 1 addition & 1 deletion src/MediaConvertClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function createJob($input): CreateJobResponse
*/
public function describeEndpoints($input = []): DescribeEndpointsResponse
{
@trigger_error(sprintf('The operation "%s" is deprecated by AWS.', __FUNCTION__), \E_USER_DEPRECATED);
@trigger_error(\sprintf('The operation "%s" is deprecated by AWS.', __FUNCTION__), \E_USER_DEPRECATED);
$input = DescribeEndpointsRequest::create($input);
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'DescribeEndpoints', 'region' => $input->getRegion(), 'exceptionMapping' => [
'BadRequestException' => BadRequestException::class,
Expand Down
10 changes: 5 additions & 5 deletions src/Result/CreateJobResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,7 @@ private function populateResultJob(array $json): Job
'Arn' => isset($json['arn']) ? (string) $json['arn'] : null,
'BillingTagsSource' => isset($json['billingTagsSource']) ? (string) $json['billingTagsSource'] : null,
'ClientRequestToken' => isset($json['clientRequestToken']) ? (string) $json['clientRequestToken'] : null,
'CreatedAt' => isset($json['createdAt']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['createdAt']))) ? $d : null,
'CreatedAt' => isset($json['createdAt']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['createdAt']))) ? $d : null,
'CurrentPhase' => isset($json['currentPhase']) ? (string) $json['currentPhase'] : null,
'ErrorCode' => isset($json['errorCode']) ? (int) $json['errorCode'] : null,
'ErrorMessage' => isset($json['errorMessage']) ? (string) $json['errorMessage'] : null,
Expand Down Expand Up @@ -1885,7 +1885,7 @@ private function populateResultQueueTransition(array $json): QueueTransition
return new QueueTransition([
'DestinationQueue' => isset($json['destinationQueue']) ? (string) $json['destinationQueue'] : null,
'SourceQueue' => isset($json['sourceQueue']) ? (string) $json['sourceQueue'] : null,
'Timestamp' => isset($json['timestamp']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['timestamp']))) ? $d : null,
'Timestamp' => isset($json['timestamp']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['timestamp']))) ? $d : null,
]);
}

Expand Down Expand Up @@ -2024,9 +2024,9 @@ private function populateResultTimedMetadataInsertion(array $json): TimedMetadat
private function populateResultTiming(array $json): Timing
{
return new Timing([
'FinishTime' => isset($json['finishTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['finishTime']))) ? $d : null,
'StartTime' => isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['startTime']))) ? $d : null,
'SubmitTime' => isset($json['submitTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['submitTime']))) ? $d : null,
'FinishTime' => isset($json['finishTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['finishTime']))) ? $d : null,
'StartTime' => isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['startTime']))) ? $d : null,
'SubmitTime' => isset($json['submitTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['submitTime']))) ? $d : null,
]);
}

Expand Down
10 changes: 5 additions & 5 deletions src/Result/GetJobResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,7 @@ private function populateResultJob(array $json): Job
'Arn' => isset($json['arn']) ? (string) $json['arn'] : null,
'BillingTagsSource' => isset($json['billingTagsSource']) ? (string) $json['billingTagsSource'] : null,
'ClientRequestToken' => isset($json['clientRequestToken']) ? (string) $json['clientRequestToken'] : null,
'CreatedAt' => isset($json['createdAt']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['createdAt']))) ? $d : null,
'CreatedAt' => isset($json['createdAt']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['createdAt']))) ? $d : null,
'CurrentPhase' => isset($json['currentPhase']) ? (string) $json['currentPhase'] : null,
'ErrorCode' => isset($json['errorCode']) ? (int) $json['errorCode'] : null,
'ErrorMessage' => isset($json['errorMessage']) ? (string) $json['errorMessage'] : null,
Expand Down Expand Up @@ -1885,7 +1885,7 @@ private function populateResultQueueTransition(array $json): QueueTransition
return new QueueTransition([
'DestinationQueue' => isset($json['destinationQueue']) ? (string) $json['destinationQueue'] : null,
'SourceQueue' => isset($json['sourceQueue']) ? (string) $json['sourceQueue'] : null,
'Timestamp' => isset($json['timestamp']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['timestamp']))) ? $d : null,
'Timestamp' => isset($json['timestamp']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['timestamp']))) ? $d : null,
]);
}

Expand Down Expand Up @@ -2024,9 +2024,9 @@ private function populateResultTimedMetadataInsertion(array $json): TimedMetadat
private function populateResultTiming(array $json): Timing
{
return new Timing([
'FinishTime' => isset($json['finishTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['finishTime']))) ? $d : null,
'StartTime' => isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['startTime']))) ? $d : null,
'SubmitTime' => isset($json['submitTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['submitTime']))) ? $d : null,
'FinishTime' => isset($json['finishTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['finishTime']))) ? $d : null,
'StartTime' => isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['startTime']))) ? $d : null,
'SubmitTime' => isset($json['submitTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['submitTime']))) ? $d : null,
]);
}

Expand Down
10 changes: 5 additions & 5 deletions src/Result/ListJobsResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -1430,7 +1430,7 @@ private function populateResultJob(array $json): Job
'Arn' => isset($json['arn']) ? (string) $json['arn'] : null,
'BillingTagsSource' => isset($json['billingTagsSource']) ? (string) $json['billingTagsSource'] : null,
'ClientRequestToken' => isset($json['clientRequestToken']) ? (string) $json['clientRequestToken'] : null,
'CreatedAt' => isset($json['createdAt']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['createdAt']))) ? $d : null,
'CreatedAt' => isset($json['createdAt']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['createdAt']))) ? $d : null,
'CurrentPhase' => isset($json['currentPhase']) ? (string) $json['currentPhase'] : null,
'ErrorCode' => isset($json['errorCode']) ? (int) $json['errorCode'] : null,
'ErrorMessage' => isset($json['errorMessage']) ? (string) $json['errorMessage'] : null,
Expand Down Expand Up @@ -1952,7 +1952,7 @@ private function populateResultQueueTransition(array $json): QueueTransition
return new QueueTransition([
'DestinationQueue' => isset($json['destinationQueue']) ? (string) $json['destinationQueue'] : null,
'SourceQueue' => isset($json['sourceQueue']) ? (string) $json['sourceQueue'] : null,
'Timestamp' => isset($json['timestamp']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['timestamp']))) ? $d : null,
'Timestamp' => isset($json['timestamp']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['timestamp']))) ? $d : null,
]);
}

Expand Down Expand Up @@ -2091,9 +2091,9 @@ private function populateResultTimedMetadataInsertion(array $json): TimedMetadat
private function populateResultTiming(array $json): Timing
{
return new Timing([
'FinishTime' => isset($json['finishTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['finishTime']))) ? $d : null,
'StartTime' => isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['startTime']))) ? $d : null,
'SubmitTime' => isset($json['submitTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', $json['submitTime']))) ? $d : null,
'FinishTime' => isset($json['finishTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['finishTime']))) ? $d : null,
'StartTime' => isset($json['startTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['startTime']))) ? $d : null,
'SubmitTime' => isset($json['submitTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['submitTime']))) ? $d : null,
]);
}

Expand Down
14 changes: 7 additions & 7 deletions src/ValueObject/AacSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public function requestBody(): array
$payload = [];
if (null !== $v = $this->audioDescriptionBroadcasterMix) {
if (!AacAudioDescriptionBroadcasterMix::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "audioDescriptionBroadcasterMix" for "%s". The value "%s" is not a valid "AacAudioDescriptionBroadcasterMix".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "audioDescriptionBroadcasterMix" for "%s". The value "%s" is not a valid "AacAudioDescriptionBroadcasterMix".', __CLASS__, $v));
}
$payload['audioDescriptionBroadcasterMix'] = $v;
}
Expand All @@ -229,25 +229,25 @@ public function requestBody(): array
}
if (null !== $v = $this->codecProfile) {
if (!AacCodecProfile::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "codecProfile" for "%s". The value "%s" is not a valid "AacCodecProfile".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "codecProfile" for "%s". The value "%s" is not a valid "AacCodecProfile".', __CLASS__, $v));
}
$payload['codecProfile'] = $v;
}
if (null !== $v = $this->codingMode) {
if (!AacCodingMode::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "codingMode" for "%s". The value "%s" is not a valid "AacCodingMode".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "codingMode" for "%s". The value "%s" is not a valid "AacCodingMode".', __CLASS__, $v));
}
$payload['codingMode'] = $v;
}
if (null !== $v = $this->rateControlMode) {
if (!AacRateControlMode::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "rateControlMode" for "%s". The value "%s" is not a valid "AacRateControlMode".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "rateControlMode" for "%s". The value "%s" is not a valid "AacRateControlMode".', __CLASS__, $v));
}
$payload['rateControlMode'] = $v;
}
if (null !== $v = $this->rawFormat) {
if (!AacRawFormat::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "rawFormat" for "%s". The value "%s" is not a valid "AacRawFormat".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "rawFormat" for "%s". The value "%s" is not a valid "AacRawFormat".', __CLASS__, $v));
}
$payload['rawFormat'] = $v;
}
Expand All @@ -256,13 +256,13 @@ public function requestBody(): array
}
if (null !== $v = $this->specification) {
if (!AacSpecification::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "specification" for "%s". The value "%s" is not a valid "AacSpecification".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "specification" for "%s". The value "%s" is not a valid "AacSpecification".', __CLASS__, $v));
}
$payload['specification'] = $v;
}
if (null !== $v = $this->vbrQuality) {
if (!AacVbrQuality::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "vbrQuality" for "%s". The value "%s" is not a valid "AacVbrQuality".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "vbrQuality" for "%s". The value "%s" is not a valid "AacVbrQuality".', __CLASS__, $v));
}
$payload['vbrQuality'] = $v;
}
Expand Down
Loading

0 comments on commit 682d8b9

Please sign in to comment.