Skip to content

Commit 46cceb8

Browse files
CS fixes
1 parent ece4caf commit 46cceb8

25 files changed

+42
-42
lines changed

Channel/AbstractChannel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ abstract class AbstractChannel implements ChannelInterface
2626
public function __construct(?TransportInterface $transport = null, ?MessageBusInterface $bus = null)
2727
{
2828
if (null === $transport && null === $bus) {
29-
throw new LogicException(sprintf('"%s" needs a Transport or a Bus but both cannot be "null".', static::class));
29+
throw new LogicException(\sprintf('"%s" needs a Transport or a Bus but both cannot be "null".', static::class));
3030
}
3131

3232
$this->transport = $transport;

Channel/ChannelPolicy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function __construct(array $policy)
2828
public function getChannels(string $importance): array
2929
{
3030
if (!isset($this->policy[$importance])) {
31-
throw new InvalidArgumentException(sprintf('Importance "%s" is not defined in the Policy.', $importance));
31+
throw new InvalidArgumentException(\sprintf('Importance "%s" is not defined in the Policy.', $importance));
3232
}
3333

3434
return $this->policy[$importance];

Channel/EmailChannel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class EmailChannel implements ChannelInterface
3737
public function __construct(?TransportInterface $transport = null, ?MessageBusInterface $bus = null, ?string $from = null, ?Envelope $envelope = null)
3838
{
3939
if (null === $transport && null === $bus) {
40-
throw new LogicException(sprintf('"%s" needs a Transport or a Bus but both cannot be "null".', static::class));
40+
throw new LogicException(\sprintf('"%s" needs a Transport or a Bus but both cannot be "null".', static::class));
4141
}
4242

4343
$this->transport = $transport;
@@ -61,7 +61,7 @@ public function notify(Notification $notification, RecipientInterface $recipient
6161
if ($email instanceof Email) {
6262
if (!$email->getFrom()) {
6363
if (null === $this->from) {
64-
throw new LogicException(sprintf('To send the "%s" notification by email, you must configure a "from" header by either setting a sender in the global "envelope" of the mailer configuration or by setting a "from" header in the "asEmailMessage()" method.', get_debug_type($notification)));
64+
throw new LogicException(\sprintf('To send the "%s" notification by email, you must configure a "from" header by either setting a sender in the global "envelope" of the mailer configuration or by setting a "from" header in the "asEmailMessage()" method.', get_debug_type($notification)));
6565
}
6666

6767
$email->from($this->from);

EventListener/SendFailedMessageToNotifierListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function onMessageFailed(WorkerMessageFailedEvent $event)
4747
}
4848
$envelope = $event->getEnvelope();
4949
$notification = Notification::fromThrowable($throwable)->importance(Notification::IMPORTANCE_HIGH);
50-
$notification->subject(sprintf('A "%s" message has just failed: %s.', $envelope->getMessage()::class, $notification->getSubject()));
50+
$notification->subject(\sprintf('A "%s" message has just failed: %s.', $envelope->getMessage()::class, $notification->getSubject()));
5151

5252
$this->notifier->send($notification, ...$this->notifier->getAdminRecipients());
5353
}

Exception/FlashMessageImportanceMapperException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class FlashMessageImportanceMapperException extends LogicException
1818
{
1919
public function __construct(string $importance, string $mappingClass)
2020
{
21-
$message = sprintf('The "%s" Notifier flash message mapper does not support an importance value of "%s".', $mappingClass, $importance);
21+
$message = \sprintf('The "%s" Notifier flash message mapper does not support an importance value of "%s".', $mappingClass, $importance);
2222

2323
parent::__construct($message);
2424
}

Exception/IncompleteDsnException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function __construct(string $message, ?string $dsn = null, ?\Throwable $p
2222
{
2323
$this->dsn = $dsn;
2424
if ($dsn) {
25-
$message = sprintf('Invalid "%s" notifier DSN: %s', $dsn, $message);
25+
$message = \sprintf('Invalid "%s" notifier DSN: %s', $dsn, $message);
2626
}
2727

2828
parent::__construct($message, 0, $previous);

Exception/MissingRequiredOptionException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class MissingRequiredOptionException extends IncompleteDsnException
1818
{
1919
public function __construct(string $option, ?string $dsn = null, ?\Throwable $previous = null)
2020
{
21-
$message = sprintf('The option "%s" is required but missing.', $option);
21+
$message = \sprintf('The option "%s" is required but missing.', $option);
2222

2323
parent::__construct($message, $dsn, $previous);
2424
}

Exception/MultipleExclusiveOptionsUsedException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class MultipleExclusiveOptionsUsedException extends InvalidArgumentException
2222
*/
2323
public function __construct(array $usedExclusiveOptions, array $exclusiveOptions, ?\Throwable $previous = null)
2424
{
25-
$message = sprintf(
25+
$message = \sprintf(
2626
'Multiple exclusive options have been used "%s". Only one of "%s" can be used.',
2727
implode('", "', $usedExclusiveOptions),
2828
implode('", "', $exclusiveOptions)

Exception/UnsupportedMessageTypeException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class UnsupportedMessageTypeException extends LogicException
2020
{
2121
public function __construct(string $transport, string $supported, MessageInterface $given)
2222
{
23-
$message = sprintf(
23+
$message = \sprintf(
2424
'The "%s" transport only supports instances of "%s" (instance of "%s" given).',
2525
$transport,
2626
$supported,

Exception/UnsupportedSchemeException.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,14 +313,14 @@ public function __construct(Dsn $dsn, ?string $name = null, array $supported = [
313313
}
314314
$package = self::SCHEME_TO_PACKAGE_MAP[$provider] ?? null;
315315
if ($package && !class_exists($package['class'])) {
316-
parent::__construct(sprintf('Unable to send notification via "%s" as the bridge is not installed. Try running "composer require %s".', $provider, $package['package']));
316+
parent::__construct(\sprintf('Unable to send notification via "%s" as the bridge is not installed. Try running "composer require %s".', $provider, $package['package']));
317317

318318
return;
319319
}
320320

321-
$message = sprintf('The "%s" scheme is not supported', $dsn->getScheme());
321+
$message = \sprintf('The "%s" scheme is not supported', $dsn->getScheme());
322322
if ($name && $supported) {
323-
$message .= sprintf('; supported schemes for notifier "%s" are: "%s"', $name, implode('", "', $supported));
323+
$message .= \sprintf('; supported schemes for notifier "%s" are: "%s"', $name, implode('", "', $supported));
324324
}
325325

326326
parent::__construct($message.'.', 0, $previous);

0 commit comments

Comments
 (0)