From a9074836b737ea69ab4260c779d1e8a474f3c26b Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 15 Mar 2020 11:08:38 +0100 Subject: [PATCH] Add missing dots at the end of exception messages --- RoutableMessageBus.php | 2 +- Transport/AmqpExt/Connection.php | 2 +- Transport/Doctrine/Connection.php | 4 ++-- Transport/RedisExt/Connection.php | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/RoutableMessageBus.php b/RoutableMessageBus.php index 6fde1687..a4a66358 100644 --- a/RoutableMessageBus.php +++ b/RoutableMessageBus.php @@ -37,7 +37,7 @@ public function __construct(ContainerInterface $busLocator, MessageBusInterface public function dispatch($envelope, array $stamps = []): Envelope { if (!$envelope instanceof Envelope) { - throw new InvalidArgumentException('Messages passed to RoutableMessageBus::dispatch() must be inside an Envelope'); + throw new InvalidArgumentException('Messages passed to RoutableMessageBus::dispatch() must be inside an Envelope.'); } /** @var BusNameStamp|null $busNameStamp */ diff --git a/Transport/AmqpExt/Connection.php b/Transport/AmqpExt/Connection.php index 2540b9d7..7664c53f 100644 --- a/Transport/AmqpExt/Connection.php +++ b/Transport/AmqpExt/Connection.php @@ -384,7 +384,7 @@ public function channel(): \AMQPChannel $credentials['password'] = '********'; unset($credentials['delay']); - throw new \AMQPException(sprintf('Could not connect to the AMQP server. Please verify the provided DSN. (%s)', json_encode($credentials)), 0, $e); + throw new \AMQPException(sprintf('Could not connect to the AMQP server. Please verify the provided DSN. (%s).', json_encode($credentials)), 0, $e); } $this->amqpChannel = $this->amqpFactory->createChannel($connection); diff --git a/Transport/Doctrine/Connection.php b/Transport/Doctrine/Connection.php index b700ca2f..6004bf36 100644 --- a/Transport/Doctrine/Connection.php +++ b/Transport/Doctrine/Connection.php @@ -92,13 +92,13 @@ public static function buildConfiguration(string $dsn, array $options = []): arr // check for extra keys in options $optionsExtraKeys = array_diff(array_keys($options), array_keys(self::DEFAULT_OPTIONS)); if (0 < \count($optionsExtraKeys)) { - throw new InvalidArgumentException(sprintf('Unknown option found : [%s]. Allowed options are [%s]', implode(', ', $optionsExtraKeys), implode(', ', array_keys(self::DEFAULT_OPTIONS)))); + throw new InvalidArgumentException(sprintf('Unknown option found : [%s]. Allowed options are [%s].', implode(', ', $optionsExtraKeys), implode(', ', array_keys(self::DEFAULT_OPTIONS)))); } // check for extra keys in options $queryExtraKeys = array_diff(array_keys($query), array_keys(self::DEFAULT_OPTIONS)); if (0 < \count($queryExtraKeys)) { - throw new InvalidArgumentException(sprintf('Unknown option found in DSN: [%s]. Allowed options are [%s]', implode(', ', $queryExtraKeys), implode(', ', array_keys(self::DEFAULT_OPTIONS)))); + throw new InvalidArgumentException(sprintf('Unknown option found in DSN: [%s]. Allowed options are [%s].', implode(', ', $queryExtraKeys), implode(', ', array_keys(self::DEFAULT_OPTIONS)))); } return $configuration; diff --git a/Transport/RedisExt/Connection.php b/Transport/RedisExt/Connection.php index e1980221..504fe0a1 100644 --- a/Transport/RedisExt/Connection.php +++ b/Transport/RedisExt/Connection.php @@ -56,11 +56,11 @@ public function __construct(array $configuration, array $connectionCredentials = $this->connection->setOption(\Redis::OPT_SERIALIZER, $redisOptions['serializer'] ?? \Redis::SERIALIZER_PHP); if (isset($connectionCredentials['auth']) && !$this->connection->auth($connectionCredentials['auth'])) { - throw new InvalidArgumentException(sprintf('Redis connection failed: %s', $redis->getLastError())); + throw new InvalidArgumentException(sprintf('Redis connection failed: %s.', $redis->getLastError())); } if (($dbIndex = $configuration['dbindex'] ?? self::DEFAULT_OPTIONS['dbindex']) && !$this->connection->select($dbIndex)) { - throw new InvalidArgumentException(sprintf('Redis connection failed: %s', $redis->getLastError())); + throw new InvalidArgumentException(sprintf('Redis connection failed: %s.', $redis->getLastError())); } $this->stream = $configuration['stream'] ?? self::DEFAULT_OPTIONS['stream'];