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 committed Jul 30, 2024
1 parent 6ad1707 commit 6712539
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 27 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.5.1

### Changed
Expand Down
10 changes: 5 additions & 5 deletions src/Input/AddLayerVersionPermissionRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,11 @@ public function request(): Request
// Prepare URI
$uri = [];
if (null === $v = $this->layerName) {
throw new InvalidArgument(sprintf('Missing parameter "LayerName" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "LayerName" for "%s". The value cannot be null.', __CLASS__));
}
$uri['LayerName'] = $v;
if (null === $v = $this->versionNumber) {
throw new InvalidArgument(sprintf('Missing parameter "VersionNumber" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "VersionNumber" for "%s". The value cannot be null.', __CLASS__));
}
$uri['VersionNumber'] = (string) $v;
$uriString = '/2018-10-31/layers/' . rawurlencode($uri['LayerName']) . '/versions/' . rawurlencode($uri['VersionNumber']) . '/policy';
Expand Down Expand Up @@ -238,15 +238,15 @@ private function requestBody(): array
$payload = [];

if (null === $v = $this->statementId) {
throw new InvalidArgument(sprintf('Missing parameter "StatementId" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "StatementId" for "%s". The value cannot be null.', __CLASS__));
}
$payload['StatementId'] = $v;
if (null === $v = $this->action) {
throw new InvalidArgument(sprintf('Missing parameter "Action" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "Action" for "%s". The value cannot be null.', __CLASS__));
}
$payload['Action'] = $v;
if (null === $v = $this->principal) {
throw new InvalidArgument(sprintf('Missing parameter "Principal" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "Principal" for "%s". The value cannot be null.', __CLASS__));
}
$payload['Principal'] = $v;
if (null !== $v = $this->organizationId) {
Expand Down
2 changes: 1 addition & 1 deletion src/Input/DeleteFunctionRequest.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->functionName) {
throw new InvalidArgument(sprintf('Missing parameter "FunctionName" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "FunctionName" for "%s". The value cannot be null.', __CLASS__));
}
$uri['FunctionName'] = $v;
$uriString = '/2015-03-31/functions/' . rawurlencode($uri['FunctionName']);
Expand Down
2 changes: 1 addition & 1 deletion src/Input/GetFunctionConfigurationRequest.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->functionName) {
throw new InvalidArgument(sprintf('Missing parameter "FunctionName" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "FunctionName" for "%s". The value cannot be null.', __CLASS__));
}
$uri['FunctionName'] = $v;
$uriString = '/2015-03-31/functions/' . rawurlencode($uri['FunctionName']) . '/configuration';
Expand Down
6 changes: 3 additions & 3 deletions src/Input/InvocationRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ public function request(): Request
];
if (null !== $this->invocationType) {
if (!InvocationType::exists($this->invocationType)) {
throw new InvalidArgument(sprintf('Invalid parameter "InvocationType" for "%s". The value "%s" is not a valid "InvocationType".', __CLASS__, $this->invocationType));
throw new InvalidArgument(\sprintf('Invalid parameter "InvocationType" for "%s". The value "%s" is not a valid "InvocationType".', __CLASS__, $this->invocationType));
}
$headers['X-Amz-Invocation-Type'] = $this->invocationType;
}
if (null !== $this->logType) {
if (!LogType::exists($this->logType)) {
throw new InvalidArgument(sprintf('Invalid parameter "LogType" for "%s". The value "%s" is not a valid "LogType".', __CLASS__, $this->logType));
throw new InvalidArgument(\sprintf('Invalid parameter "LogType" for "%s". The value "%s" is not a valid "LogType".', __CLASS__, $this->logType));
}
$headers['X-Amz-Log-Type'] = $this->logType;
}
Expand All @@ -183,7 +183,7 @@ public function request(): Request
// Prepare URI
$uri = [];
if (null === $v = $this->functionName) {
throw new InvalidArgument(sprintf('Missing parameter "FunctionName" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "FunctionName" for "%s". The value cannot be null.', __CLASS__));
}
$uri['FunctionName'] = $v;
$uriString = '/2015-03-31/functions/' . rawurlencode($uri['FunctionName']) . '/invocations';
Expand Down
2 changes: 1 addition & 1 deletion src/Input/ListFunctionsRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function request(): Request
}
if (null !== $this->functionVersion) {
if (!FunctionVersion::exists($this->functionVersion)) {
throw new InvalidArgument(sprintf('Invalid parameter "FunctionVersion" for "%s". The value "%s" is not a valid "FunctionVersion".', __CLASS__, $this->functionVersion));
throw new InvalidArgument(\sprintf('Invalid parameter "FunctionVersion" for "%s". The value "%s" is not a valid "FunctionVersion".', __CLASS__, $this->functionVersion));
}
$query['FunctionVersion'] = $this->functionVersion;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Input/ListLayerVersionsRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public function request(): Request
$query = [];
if (null !== $this->compatibleRuntime) {
if (!Runtime::exists($this->compatibleRuntime)) {
throw new InvalidArgument(sprintf('Invalid parameter "CompatibleRuntime" for "%s". The value "%s" is not a valid "Runtime".', __CLASS__, $this->compatibleRuntime));
throw new InvalidArgument(\sprintf('Invalid parameter "CompatibleRuntime" for "%s". The value "%s" is not a valid "Runtime".', __CLASS__, $this->compatibleRuntime));
}
$query['CompatibleRuntime'] = $this->compatibleRuntime;
}
Expand All @@ -147,15 +147,15 @@ public function request(): Request
}
if (null !== $this->compatibleArchitecture) {
if (!Architecture::exists($this->compatibleArchitecture)) {
throw new InvalidArgument(sprintf('Invalid parameter "CompatibleArchitecture" for "%s". The value "%s" is not a valid "Architecture".', __CLASS__, $this->compatibleArchitecture));
throw new InvalidArgument(\sprintf('Invalid parameter "CompatibleArchitecture" for "%s". The value "%s" is not a valid "Architecture".', __CLASS__, $this->compatibleArchitecture));
}
$query['CompatibleArchitecture'] = $this->compatibleArchitecture;
}

// Prepare URI
$uri = [];
if (null === $v = $this->layerName) {
throw new InvalidArgument(sprintf('Missing parameter "LayerName" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "LayerName" for "%s". The value cannot be null.', __CLASS__));
}
$uri['LayerName'] = $v;
$uriString = '/2018-10-31/layers/' . rawurlencode($uri['LayerName']) . '/versions';
Expand Down
2 changes: 1 addition & 1 deletion src/Input/ListVersionsByFunctionRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function request(): Request
// Prepare URI
$uri = [];
if (null === $v = $this->functionName) {
throw new InvalidArgument(sprintf('Missing parameter "FunctionName" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "FunctionName" for "%s". The value cannot be null.', __CLASS__));
}
$uri['FunctionName'] = $v;
$uriString = '/2015-03-31/functions/' . rawurlencode($uri['FunctionName']) . '/versions';
Expand Down
8 changes: 4 additions & 4 deletions src/Input/PublishLayerVersionRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function request(): Request
// Prepare URI
$uri = [];
if (null === $v = $this->layerName) {
throw new InvalidArgument(sprintf('Missing parameter "LayerName" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "LayerName" for "%s". The value cannot be null.', __CLASS__));
}
$uri['LayerName'] = $v;
$uriString = '/2018-10-31/layers/' . rawurlencode($uri['LayerName']) . '/versions';
Expand Down Expand Up @@ -231,7 +231,7 @@ private function requestBody(): array
$payload['Description'] = $v;
}
if (null === $v = $this->content) {
throw new InvalidArgument(sprintf('Missing parameter "Content" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "Content" for "%s". The value cannot be null.', __CLASS__));
}
$payload['Content'] = $v->requestBody();
if (null !== $v = $this->compatibleRuntimes) {
Expand All @@ -240,7 +240,7 @@ private function requestBody(): array
foreach ($v as $listValue) {
++$index;
if (!Runtime::exists($listValue)) {
throw new InvalidArgument(sprintf('Invalid parameter "CompatibleRuntimes" for "%s". The value "%s" is not a valid "Runtime".', __CLASS__, $listValue));
throw new InvalidArgument(\sprintf('Invalid parameter "CompatibleRuntimes" for "%s". The value "%s" is not a valid "Runtime".', __CLASS__, $listValue));
}
$payload['CompatibleRuntimes'][$index] = $listValue;
}
Expand All @@ -254,7 +254,7 @@ private function requestBody(): array
foreach ($v as $listValue) {
++$index;
if (!Architecture::exists($listValue)) {
throw new InvalidArgument(sprintf('Invalid parameter "CompatibleArchitectures" for "%s". The value "%s" is not a valid "Architecture".', __CLASS__, $listValue));
throw new InvalidArgument(\sprintf('Invalid parameter "CompatibleArchitectures" for "%s". The value "%s" is not a valid "Architecture".', __CLASS__, $listValue));
}
$payload['CompatibleArchitectures'][$index] = $listValue;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Input/UpdateFunctionConfigurationRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ public function request(): Request
// Prepare URI
$uri = [];
if (null === $v = $this->functionName) {
throw new InvalidArgument(sprintf('Missing parameter "FunctionName" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "FunctionName" for "%s". The value cannot be null.', __CLASS__));
}
$uri['FunctionName'] = $v;
$uriString = '/2015-03-31/functions/' . rawurlencode($uri['FunctionName']) . '/configuration';
Expand Down Expand Up @@ -586,7 +586,7 @@ private function requestBody(): array
}
if (null !== $v = $this->runtime) {
if (!Runtime::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "Runtime" for "%s". The value "%s" is not a valid "Runtime".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "Runtime" for "%s". The value "%s" is not a valid "Runtime".', __CLASS__, $v));
}
$payload['Runtime'] = $v;
}
Expand Down
2 changes: 1 addition & 1 deletion src/LambdaClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,6 @@ protected function getEndpointMetadata(?string $region): array
];
}

throw new UnsupportedRegion(sprintf('The region "%s" is not supported by "Lambda".', $region));
throw new UnsupportedRegion(\sprintf('The region "%s" is not supported by "Lambda".', $region));
}
}
6 changes: 3 additions & 3 deletions src/ValueObject/LoggingConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,19 @@ public function requestBody(): array
$payload = [];
if (null !== $v = $this->logFormat) {
if (!LogFormat::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "LogFormat" for "%s". The value "%s" is not a valid "LogFormat".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "LogFormat" for "%s". The value "%s" is not a valid "LogFormat".', __CLASS__, $v));
}
$payload['LogFormat'] = $v;
}
if (null !== $v = $this->applicationLogLevel) {
if (!ApplicationLogLevel::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "ApplicationLogLevel" for "%s". The value "%s" is not a valid "ApplicationLogLevel".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "ApplicationLogLevel" for "%s". The value "%s" is not a valid "ApplicationLogLevel".', __CLASS__, $v));
}
$payload['ApplicationLogLevel'] = $v;
}
if (null !== $v = $this->systemLogLevel) {
if (!SystemLogLevel::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "SystemLogLevel" for "%s". The value "%s" is not a valid "SystemLogLevel".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "SystemLogLevel" for "%s". The value "%s" is not a valid "SystemLogLevel".', __CLASS__, $v));
}
$payload['SystemLogLevel'] = $v;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ValueObject/SnapStart.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function requestBody(): array
$payload = [];
if (null !== $v = $this->applyOn) {
if (!SnapStartApplyOn::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "ApplyOn" for "%s". The value "%s" is not a valid "SnapStartApplyOn".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "ApplyOn" for "%s". The value "%s" is not a valid "SnapStartApplyOn".', __CLASS__, $v));
}
$payload['ApplyOn'] = $v;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ValueObject/TracingConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function requestBody(): array
$payload = [];
if (null !== $v = $this->mode) {
if (!TracingMode::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "Mode" for "%s". The value "%s" is not a valid "TracingMode".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "Mode" for "%s". The value "%s" is not a valid "TracingMode".', __CLASS__, $v));
}
$payload['Mode'] = $v;
}
Expand Down

0 comments on commit 6712539

Please sign in to comment.