Skip to content

Commit 3b618fc

Browse files
committed
Fixed PSR2 php-cs-fixer rules
1 parent 3b5e574 commit 3b618fc

File tree

8 files changed

+38
-13
lines changed

8 files changed

+38
-13
lines changed

src/Common/Api/Parameter.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,9 @@ private function validateEnums($userValues)
207207
{
208208
if (!empty($this->enum) && $this->type == 'string' && !in_array($userValues, $this->enum)) {
209209
throw new \Exception(sprintf(
210-
'The only permitted values are %s. You provided %s', implode(', ', $this->enum), print_r($userValues, true)
210+
'The only permitted values are %s. You provided %s',
211+
implode(', ', $this->enum),
212+
print_r($userValues, true)
211213
));
212214
}
213215
}
@@ -217,7 +219,10 @@ private function validateType($userValues)
217219
if (!$this->hasCorrectType($userValues)) {
218220
throw new \Exception(sprintf(
219221
'The key provided "%s" has the wrong value type. You provided %s (%s) but was expecting %s',
220-
$this->name, print_r($userValues, true), gettype($userValues), $this->type
222+
$this->name,
223+
print_r($userValues, true),
224+
gettype($userValues),
225+
$this->type
221226
));
222227
}
223228
}

src/Common/Error/Builder.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,11 @@ public function httpError(RequestInterface $request, ResponseInterface $response
116116
{
117117
$message = $this->header('HTTP Error');
118118

119-
$message .= sprintf("The remote server returned a \"%d %s\" error for the following transaction:\n\n",
120-
$response->getStatusCode(), $response->getReasonPhrase());
119+
$message .= sprintf(
120+
"The remote server returned a \"%d %s\" error for the following transaction:\n\n",
121+
$response->getStatusCode(),
122+
$response->getReasonPhrase()
123+
);
121124

122125
$message .= $this->header('Request');
123126
$message .= trim($this->str($request)) . PHP_EOL . PHP_EOL;
@@ -163,8 +166,11 @@ public function userInputError(string $expectedType, $userValue, string $further
163166
{
164167
$message = $this->header('User Input Error');
165168

166-
$message .= sprintf("%s was expected, but the following value was passed in:\n\n%s\n",
167-
$expectedType, print_r($userValue, true));
169+
$message .= sprintf(
170+
"%s was expected, but the following value was passed in:\n\n%s\n",
171+
$expectedType,
172+
print_r($userValue, true)
173+
);
168174

169175
$message .= "Please ensure that the value adheres to the expectation above. ";
170176

src/Common/Service/Builder.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ private function mergeOptions(array $serviceOptions): array
166166

167167
if (!isset($options['identityService']) || !($options['identityService'] instanceof IdentityService)) {
168168
throw new \InvalidArgumentException(sprintf(
169-
'"identityService" must be specified and implement %s', IdentityService::class
169+
'"identityService" must be specified and implement %s',
170+
IdentityService::class
170171
));
171172
}
172173

src/Common/Transport/JsonSerializer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ private function serializeObjectValue($value)
101101
} elseif (!($value instanceof \stdClass)) {
102102
throw new \InvalidArgumentException(sprintf(
103103
'When an object value is provided, it must either be \stdClass or implement the Serializable '
104-
. 'interface, you provided %s', print_r($value, true)
104+
. 'interface, you provided %s',
105+
print_r($value, true)
105106
));
106107
}
107108
}

src/Identity/v2/Models/Catalog.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@ public function getServiceUrl(
6161

6262
throw new \RuntimeException(sprintf(
6363
"Endpoint URL could not be found in the catalog for this service.\nName: %s\nType: %s\nRegion: %s\nURL type: %s",
64-
$serviceName, $serviceType, $region, $urlType
64+
$serviceName,
65+
$serviceType,
66+
$region,
67+
$urlType
6568
));
6669
}
6770
}

src/Identity/v3/Models/Catalog.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ public function getServiceUrl(string $name, string $type, string $region, string
5656

5757
throw new \RuntimeException(sprintf(
5858
"Endpoint URL could not be found in the catalog for this service.\nName: %s\nType: %s\nRegion: %s\nURL type: %s",
59-
$name, $type, $region, $urlType
59+
$name,
60+
$type,
61+
$region,
62+
$urlType
6063
));
6164
}
6265
}

src/Identity/v3/Service.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,13 @@ public function authenticate(array $options): array
5050
return [$token, $baseUrl];
5151
}
5252

53-
throw new \RuntimeException(sprintf("No service found with type [%s] name [%s] region [%s] interface [%s]",
54-
$type, $name, $region, $interface));
53+
throw new \RuntimeException(sprintf(
54+
"No service found with type [%s] name [%s] region [%s] interface [%s]",
55+
$type,
56+
$name,
57+
$region,
58+
$interface
59+
));
5560
}
5661

5762
/**

tests/integration/Compute/v2/CoreTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,8 @@ private function attachVolumeToServer()
672672

673673
$this->volume->waitUntil('in-use');
674674

675-
$this->logStep('Attached volume {volumeId} to server {serverId} with volume attachment id {volumeAttachmentId}',
675+
$this->logStep(
676+
'Attached volume {volumeId} to server {serverId} with volume attachment id {volumeAttachmentId}',
676677
array_merge($replacements, ['{volumeAttachmentId}' => $volumeAttachment->id])
677678
);
678679
}

0 commit comments

Comments
 (0)