8000 Prefix all sprintf() calls · symfony/amazon-sqs-messenger@1b381a9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1b381a9

Browse files
committed
Prefix all sprintf() calls
1 parent f2f7ee7 commit 1b381a9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Transport/Connection.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ public static function fromDsn(#[\SensitiveParameter] string $dsn, array $option
114114
// check for extra keys in options
115115
$optionsExtraKeys = array_diff(array_keys($options), array_keys(self::DEFAULT_OPTIONS));
116116
if (0 < \count($optionsExtraKeys)) {
117-
throw new InvalidArgumentException(sprintf('Unknown option found: [%s]. Allowed options are [%s].', implode(', ', $optionsExtraKeys), implode(', ', array_keys(self::DEFAULT_OPTIONS))));
117+
throw new InvalidArgumentException(\sprintf('Unknown option found: [%s]. Allowed options are [%s].', implode(', ', $optionsExtraKeys), implode(', ', array_keys(self::DEFAULT_OPTIONS))));
118118
}
119119

120120
// check for extra keys in options
121121
$queryExtraKeys = array_diff(array_keys($query), array_keys(self::DEFAULT_OPTIONS));
122122
if (0 < \count($queryExtraKeys)) {
123-
throw new InvalidArgumentException(sprintf('Unknown option found in DSN: [%s]. Allowed options are [%s].', implode(', ', $queryExtraKeys), implode(', ', array_keys(self::DEFAULT_OPTIONS))));
123+
throw new InvalidArgumentException(\sprintf('Unknown option found in DSN: [%s]. Allowed options are [%s].', implode(', ', $queryExtraKeys), implode(', ', array_keys(self::DEFAULT_OPTIONS))));
124124
}
125125

126126
$options = $query + $options + self::DEFAULT_OPTIONS;
@@ -147,7 +147,7 @@ public static function fromDsn(#[\SensitiveParameter] string $dsn, array $option
147147
unset($query['region']);
148148

149149
if ('default' !== ($params['host'] ?? 'default')) {
150-
$clientConfiguration['endpoint'] = sprintf('%s://%s%s', ($query['sslmode'] ?? null) === 'disable' ? 'http' : 'https', $params['host'], ($params['port'] ?? null) ? ':'.$params['port'] : '');
150+
$clientConfiguration['endpoint'] = \sprintf('%s://%s%s', ($query['sslmode'] ?? null) === 'disable' ? 'http' : 'https', $params['host'], ($params['port'] ?? null) ? ':'.$params['port'] : '');
151151
if (preg_match(';^sqs\.([^\.]++)\.amazonaws\.com$;', $params['host'], $matches)) {
152152
$clientConfiguration['region'] = $matches[1];
153153
}
@@ -274,7 +274,7 @@ public function setup(): void
274274
}
275275

276276
if (null !== $this->configuration['account']) {
277-
throw new InvalidArgumentException(sprintf('The Amazon SQS queue "%s" does not exist (or you don\'t have permissions on it), and can\'t be created when an account is provided.', $this->configuration['queue_name']));
277+
throw new InvalidArgumentException(\sprintf('The Amazon SQS queue "%s" does not exist (or you don\'t have permissions on it), and can\'t be created when an account is provided.', $this->configuration['queue_name']));
278278
}
279279

280280
$parameters = ['QueueName' => $this->configuration['queue_name']];
@@ -290,7 +290,7 @@ public function setup(): void
290290
// Blocking call to wait for the queue to be created
291291
$exists->wait();
292292
if (!$exists->isSuccess()) {
293-
throw new TransportException(sprintf('Failed to create the Amazon SQS queue "%s".', $this->configuration['queue_name']));
293+
throw new TransportException(\sprintf('Failed to create the Amazon SQS queue "%s".', $this->configuration['queue_name']));
294294
}
295295
$this->queueUrl = null;
296296
}

0 commit comments

Comments
 (0)
0