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 a09f725 commit 3e93afa
Show file tree
Hide file tree
Showing 40 changed files with 131 additions and 127 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.3.0

### Added
Expand Down
8 changes: 4 additions & 4 deletions src/Input/AbortMultipartUploadRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public function request(): Request
$headers = ['content-type' => 'application/xml'];
if (null !== $this->requestPayer) {
if (!RequestPayer::exists($this->requestPayer)) {
throw new InvalidArgument(sprintf('Invalid parameter "RequestPayer" for "%s". The value "%s" is not a valid "RequestPayer".', __CLASS__, $this->requestPayer));
throw new InvalidArgument(\sprintf('Invalid parameter "RequestPayer" for "%s". The value "%s" is not a valid "RequestPayer".', __CLASS__, $this->requestPayer));
}
$headers['x-amz-request-payer'] = $this->requestPayer;
}
Expand All @@ -158,18 +158,18 @@ public function request(): Request
// Prepare query
$query = [];
if (null === $v = $this->uploadId) {
throw new InvalidArgument(sprintf('Missing parameter "UploadId" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "UploadId" for "%s". The value cannot be null.', __CLASS__));
}
$query['uploadId'] = $v;

// Prepare URI
$uri = [];
if (null === $v = $this->bucket) {
throw new InvalidArgument(sprintf('Missing parameter "Bucket" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "Bucket" for "%s". The value cannot be null.', __CLASS__));
}
$uri['Bucket'] = $v;
if (null === $v = $this->key) {
throw new InvalidArgument(sprintf('Missing parameter "Key" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "Key" for "%s". The value cannot be null.', __CLASS__));
}
$uri['Key'] = $v;
$uriString = '/' . rawurlencode($uri['Bucket']) . '/' . str_replace('%2F', '/', rawurlencode($uri['Key']));
Expand Down
8 changes: 4 additions & 4 deletions src/Input/CompleteMultipartUploadRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ public function request(): Request
}
if (null !== $this->requestPayer) {
if (!RequestPayer::exists($this->requestPayer)) {
throw new InvalidArgument(sprintf('Invalid parameter "RequestPayer" for "%s". The value "%s" is not a valid "RequestPayer".', __CLASS__, $this->requestPayer));
throw new InvalidArgument(\sprintf('Invalid parameter "RequestPayer" for "%s". The value "%s" is not a valid "RequestPayer".', __CLASS__, $this->requestPayer));
}
$headers['x-amz-request-payer'] = $this->requestPayer;
}
Expand All @@ -334,18 +334,18 @@ public function request(): Request
// Prepare query
$query = [];
if (null === $v = $this->uploadId) {
throw new InvalidArgument(sprintf('Missing parameter "UploadId" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "UploadId" for "%s". The value cannot be null.', __CLASS__));
}
$query['uploadId'] = $v;

// Prepare URI
$uri = [];
if (null === $v = $this->bucket) {
throw new InvalidArgument(sprintf('Missing parameter "Bucket" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "Bucket" for "%s". The value cannot be null.', __CLASS__));
}
$uri['Bucket'] = $v;
if (null === $v = $this->key) {
throw new InvalidArgument(sprintf('Missing parameter "Key" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "Key" for "%s". The value cannot be null.', __CLASS__));
}
$uri['Key'] = $v;
$uriString = '/' . rawurlencode($uri['Bucket']) . '/' . str_replace('%2F', '/', rawurlencode($uri['Key']));
Expand Down
24 changes: 12 additions & 12 deletions src/Input/CopyObjectRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ public function request(): Request
$headers = ['content-type' => 'application/xml'];
if (null !== $this->acl) {
if (!ObjectCannedACL::exists($this->acl)) {
throw new InvalidArgument(sprintf('Invalid parameter "ACL" for "%s". The value "%s" is not a valid "ObjectCannedACL".', __CLASS__, $this->acl));
throw new InvalidArgument(\sprintf('Invalid parameter "ACL" for "%s". The value "%s" is not a valid "ObjectCannedACL".', __CLASS__, $this->acl));
}
$headers['x-amz-acl'] = $this->acl;
}
Expand All @@ -1035,7 +1035,7 @@ public function request(): Request
}
if (null !== $this->checksumAlgorithm) {
if (!ChecksumAlgorithm::exists($this->checksumAlgorithm)) {
throw new InvalidArgument(sprintf('Invalid parameter "ChecksumAlgorithm" for "%s". The value "%s" is not a valid "ChecksumAlgorithm".', __CLASS__, $this->checksumAlgorithm));
throw new InvalidArgument(\sprintf('Invalid parameter "ChecksumAlgorithm" for "%s". The value "%s" is not a valid "ChecksumAlgorithm".', __CLASS__, $this->checksumAlgorithm));
}
$headers['x-amz-checksum-algorithm'] = $this->checksumAlgorithm;
}
Expand All @@ -1052,7 +1052,7 @@ public function request(): Request
$headers['Content-Type'] = $this->contentType;
}
if (null === $v = $this->copySource) {
throw new InvalidArgument(sprintf('Missing parameter "CopySource" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "CopySource" for "%s". The value cannot be null.', __CLASS__));
}
$headers['x-amz-copy-source'] = $v;
if (null !== $this->copySourceIfMatch) {
Expand Down Expand Up @@ -1084,25 +1084,25 @@ public function request(): Request
}
if (null !== $this->metadataDirective) {
if (!MetadataDirective::exists($this->metadataDirective)) {
throw new InvalidArgument(sprintf('Invalid parameter "MetadataDirective" for "%s". The value "%s" is not a valid "MetadataDirective".', __CLASS__, $this->metadataDirective));
throw new InvalidArgument(\sprintf('Invalid parameter "MetadataDirective" for "%s". The value "%s" is not a valid "MetadataDirective".', __CLASS__, $this->metadataDirective));
}
$headers['x-amz-metadata-directive'] = $this->metadataDirective;
}
if (null !== $this->taggingDirective) {
if (!TaggingDirective::exists($this->taggingDirective)) {
throw new InvalidArgument(sprintf('Invalid parameter "TaggingDirective" for "%s". The value "%s" is not a valid "TaggingDirective".', __CLASS__, $this->taggingDirective));
throw new InvalidArgument(\sprintf('Invalid parameter "TaggingDirective" for "%s". The value "%s" is not a valid "TaggingDirective".', __CLASS__, $this->taggingDirective));
}
$headers['x-amz-tagging-directive'] = $this->taggingDirective;
}
if (null !== $this->serverSideEncryption) {
if (!ServerSideEncryption::exists($this->serverSideEncryption)) {
throw new InvalidArgument(sprintf('Invalid parameter "ServerSideEncryption" for "%s". The value "%s" is not a valid "ServerSideEncryption".', __CLASS__, $this->serverSideEncryption));
throw new InvalidArgument(\sprintf('Invalid parameter "ServerSideEncryption" for "%s". The value "%s" is not a valid "ServerSideEncryption".', __CLASS__, $this->serverSideEncryption));
}
$headers['x-amz-server-side-encryption'] = $this->serverSideEncryption;
}
if (null !== $this->storageClass) {
if (!StorageClass::exists($this->storageClass)) {
throw new InvalidArgument(sprintf('Invalid parameter "StorageClass" for "%s". The value "%s" is not a valid "StorageClass".', __CLASS__, $this->storageClass));
throw new InvalidArgument(\sprintf('Invalid parameter "StorageClass" for "%s". The value "%s" is not a valid "StorageClass".', __CLASS__, $this->storageClass));
}
$headers['x-amz-storage-class'] = $this->storageClass;
}
Expand Down Expand Up @@ -1138,7 +1138,7 @@ public function request(): Request
}
if (null !== $this->requestPayer) {
if (!RequestPayer::exists($this->requestPayer)) {
throw new InvalidArgument(sprintf('Invalid parameter "RequestPayer" for "%s". The value "%s" is not a valid "RequestPayer".', __CLASS__, $this->requestPayer));
throw new InvalidArgument(\sprintf('Invalid parameter "RequestPayer" for "%s". The value "%s" is not a valid "RequestPayer".', __CLASS__, $this->requestPayer));
}
$headers['x-amz-request-payer'] = $this->requestPayer;
}
Expand All @@ -1147,7 +1147,7 @@ public function request(): Request
}
if (null !== $this->objectLockMode) {
if (!ObjectLockMode::exists($this->objectLockMode)) {
throw new InvalidArgument(sprintf('Invalid parameter "ObjectLockMode" for "%s". The value "%s" is not a valid "ObjectLockMode".', __CLASS__, $this->objectLockMode));
throw new InvalidArgument(\sprintf('Invalid parameter "ObjectLockMode" for "%s". The value "%s" is not a valid "ObjectLockMode".', __CLASS__, $this->objectLockMode));
}
$headers['x-amz-object-lock-mode'] = $this->objectLockMode;
}
Expand All @@ -1156,7 +1156,7 @@ public function request(): Request
}
if (null !== $this->objectLockLegalHoldStatus) {
if (!ObjectLockLegalHoldStatus::exists($this->objectLockLegalHoldStatus)) {
throw new InvalidArgument(sprintf('Invalid parameter "ObjectLockLegalHoldStatus" for "%s". The value "%s" is not a valid "ObjectLockLegalHoldStatus".', __CLASS__, $this->objectLockLegalHoldStatus));
throw new InvalidArgument(\sprintf('Invalid parameter "ObjectLockLegalHoldStatus" for "%s". The value "%s" is not a valid "ObjectLockLegalHoldStatus".', __CLASS__, $this->objectLockLegalHoldStatus));
}
$headers['x-amz-object-lock-legal-hold'] = $this->objectLockLegalHoldStatus;
}
Expand All @@ -1178,11 +1178,11 @@ public function request(): Request
// Prepare URI
$uri = [];
if (null === $v = $this->bucket) {
throw new InvalidArgument(sprintf('Missing parameter "Bucket" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "Bucket" for "%s". The value cannot be null.', __CLASS__));
}
$uri['Bucket'] = $v;
if (null === $v = $this->key) {
throw new InvalidArgument(sprintf('Missing parameter "Key" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "Key" for "%s". The value cannot be null.', __CLASS__));
}
$uri['Key'] = $v;
$uriString = '/' . rawurlencode($uri['Bucket']) . '/' . str_replace('%2F', '/', rawurlencode($uri['Key']));
Expand Down
6 changes: 3 additions & 3 deletions src/Input/CreateBucketRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ public function request(): Request
$headers = ['content-type' => 'application/xml'];
if (null !== $this->acl) {
if (!BucketCannedACL::exists($this->acl)) {
throw new InvalidArgument(sprintf('Invalid parameter "ACL" for "%s". The value "%s" is not a valid "BucketCannedACL".', __CLASS__, $this->acl));
throw new InvalidArgument(\sprintf('Invalid parameter "ACL" for "%s". The value "%s" is not a valid "BucketCannedACL".', __CLASS__, $this->acl));
}
$headers['x-amz-acl'] = $this->acl;
}
Expand All @@ -249,7 +249,7 @@ public function request(): Request
}
if (null !== $this->objectOwnership) {
if (!ObjectOwnership::exists($this->objectOwnership)) {
throw new InvalidArgument(sprintf('Invalid parameter "ObjectOwnership" for "%s". The value "%s" is not a valid "ObjectOwnership".', __CLASS__, $this->objectOwnership));
throw new InvalidArgument(\sprintf('Invalid parameter "ObjectOwnership" for "%s". The value "%s" is not a valid "ObjectOwnership".', __CLASS__, $this->objectOwnership));
}
$headers['x-amz-object-ownership'] = $this->objectOwnership;
}
Expand All @@ -260,7 +260,7 @@ public function request(): Request
// Prepare URI
$uri = [];
if (null === $v = $this->bucket) {
throw new InvalidArgument(sprintf('Missing parameter "Bucket" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "Bucket" for "%s". The value cannot be null.', __CLASS__));
}
$uri['Bucket'] = $v;
$uriString = '/' . rawurlencode($uri['Bucket']);
Expand Down
18 changes: 9 additions & 9 deletions src/Input/CreateMultipartUploadRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ public function request(): Request
$headers = ['content-type' => 'application/xml'];
if (null !== $this->acl) {
if (!ObjectCannedACL::exists($this->acl)) {
throw new InvalidArgument(sprintf('Invalid parameter "ACL" for "%s". The value "%s" is not a valid "ObjectCannedACL".', __CLASS__, $this->acl));
throw new InvalidArgument(\sprintf('Invalid parameter "ACL" for "%s". The value "%s" is not a valid "ObjectCannedACL".', __CLASS__, $this->acl));
}
$headers['x-amz-acl'] = $this->acl;
}
Expand Down Expand Up @@ -798,13 +798,13 @@ public function request(): Request
}
if (null !== $this->serverSideEncryption) {
if (!ServerSideEncryption::exists($this->serverSideEncryption)) {
throw new InvalidArgument(sprintf('Invalid parameter "ServerSideEncryption" for "%s". The value "%s" is not a valid "ServerSideEncryption".', __CLASS__, $this->serverSideEncryption));
throw new InvalidArgument(\sprintf('Invalid parameter "ServerSideEncryption" for "%s". The value "%s" is not a valid "ServerSideEncryption".', __CLASS__, $this->serverSideEncryption));
}
$headers['x-amz-server-side-encryption'] = $this->serverSideEncryption;
}
if (null !== $this->storageClass) {
if (!StorageClass::exists($this->storageClass)) {
throw new InvalidArgument(sprintf('Invalid parameter "StorageClass" for "%s". The value "%s" is not a valid "StorageClass".', __CLASS__, $this->storageClass));
throw new InvalidArgument(\sprintf('Invalid parameter "StorageClass" for "%s". The value "%s" is not a valid "StorageClass".', __CLASS__, $this->storageClass));
}
$headers['x-amz-storage-class'] = $this->storageClass;
}
Expand All @@ -831,7 +831,7 @@ public function request(): Request
}
if (null !== $this->requestPayer) {
if (!RequestPayer::exists($this->requestPayer)) {
throw new InvalidArgument(sprintf('Invalid parameter "RequestPayer" for "%s". The value "%s" is not a valid "RequestPayer".', __CLASS__, $this->requestPayer));
throw new InvalidArgument(\sprintf('Invalid parameter "RequestPayer" for "%s". The value "%s" is not a valid "RequestPayer".', __CLASS__, $this->requestPayer));
}
$headers['x-amz-request-payer'] = $this->requestPayer;
}
Expand All @@ -840,7 +840,7 @@ public function request(): Request
}
if (null !== $this->objectLockMode) {
if (!ObjectLockMode::exists($this->objectLockMode)) {
throw new InvalidArgument(sprintf('Invalid parameter "ObjectLockMode" for "%s". The value "%s" is not a valid "ObjectLockMode".', __CLASS__, $this->objectLockMode));
throw new InvalidArgument(\sprintf('Invalid parameter "ObjectLockMode" for "%s". The value "%s" is not a valid "ObjectLockMode".', __CLASS__, $this->objectLockMode));
}
$headers['x-amz-object-lock-mode'] = $this->objectLockMode;
}
Expand All @@ -849,7 +849,7 @@ public function request(): Request
}
if (null !== $this->objectLockLegalHoldStatus) {
if (!ObjectLockLegalHoldStatus::exists($this->objectLockLegalHoldStatus)) {
throw new InvalidArgument(sprintf('Invalid parameter "ObjectLockLegalHoldStatus" for "%s". The value "%s" is not a valid "ObjectLockLegalHoldStatus".', __CLASS__, $this->objectLockLegalHoldStatus));
throw new InvalidArgument(\sprintf('Invalid parameter "ObjectLockLegalHoldStatus" for "%s". The value "%s" is not a valid "ObjectLockLegalHoldStatus".', __CLASS__, $this->objectLockLegalHoldStatus));
}
$headers['x-amz-object-lock-legal-hold'] = $this->objectLockLegalHoldStatus;
}
Expand All @@ -858,7 +858,7 @@ public function request(): Request
}
if (null !== $this->checksumAlgorithm) {
if (!ChecksumAlgorithm::exists($this->checksumAlgorithm)) {
throw new InvalidArgument(sprintf('Invalid parameter "ChecksumAlgorithm" for "%s". The value "%s" is not a valid "ChecksumAlgorithm".', __CLASS__, $this->checksumAlgorithm));
throw new InvalidArgument(\sprintf('Invalid parameter "ChecksumAlgorithm" for "%s". The value "%s" is not a valid "ChecksumAlgorithm".', __CLASS__, $this->checksumAlgorithm));
}
$headers['x-amz-checksum-algorithm'] = $this->checksumAlgorithm;
}
Expand All @@ -874,11 +874,11 @@ public function request(): Request
// Prepare URI
$uri = [];
if (null === $v = $this->bucket) {
throw new InvalidArgument(sprintf('Missing parameter "Bucket" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "Bucket" for "%s". The value cannot be null.', __CLASS__));
}
$uri['Bucket'] = $v;
if (null === $v = $this->key) {
throw new InvalidArgument(sprintf('Missing parameter "Key" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "Key" for "%s". The value cannot be null.', __CLASS__));
}
$uri['Key'] = $v;
$uriString = '/' . rawurlencode($uri['Bucket']) . '/' . str_replace('%2F', '/', rawurlencode($uri['Key'])) . '?uploads';
Expand Down
2 changes: 1 addition & 1 deletion src/Input/DeleteBucketCorsRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function request(): Request
// Prepare URI
$uri = [];
if (null === $v = $this->bucket) {
throw new InvalidArgument(sprintf('Missing parameter "Bucket" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "Bucket" for "%s". The value cannot be null.', __CLASS__));
}
$uri['Bucket'] = $v;
$uriString = '/' . rawurlencode($uri['Bucket']) . '?cors';
Expand Down
2 changes: 1 addition & 1 deletion src/Input/DeleteBucketRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function request(): Request
// Prepare URI
$uri = [];
if (null === $v = $this->bucket) {
throw new InvalidArgument(sprintf('Missing parameter "Bucket" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "Bucket" for "%s". The value cannot be null.', __CLASS__));
}
$uri['Bucket'] = $v;
$uriString = '/' . rawurlencode($uri['Bucket']);
Expand Down
Loading

0 comments on commit 3e93afa

Please sign in to comment.