diff --git a/Store/StoreFactory.php b/Store/StoreFactory.php index bc12c27..b9a5c1e 100644 --- a/Store/StoreFactory.php +++ b/Store/StoreFactory.php @@ -33,7 +33,7 @@ class StoreFactory public static function createStore($connection) { if (!\is_string($connection) && !\is_object($connection)) { - throw new \TypeError(sprintf('Argument 1 passed to %s() must be a string or a connection object, %s given.', __METHOD__, \gettype($connection))); + throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be a string or a connection object, "%s" given.', __METHOD__, \gettype($connection))); } switch (true) { @@ -56,7 +56,7 @@ public static function createStore($connection) return new ZookeeperStore($connection); case !\is_string($connection): - throw new InvalidArgumentException(sprintf('Unsupported Connection: %s.', \get_class($connection))); + throw new InvalidArgumentException(sprintf('Unsupported Connection: "%s".', \get_class($connection))); case 'flock' === $connection: return new FlockStore(); diff --git a/Store/ZookeeperStore.php b/Store/ZookeeperStore.php index cc46db1..90d5296 100644 --- a/Store/ZookeeperStore.php +++ b/Store/ZookeeperStore.php @@ -38,11 +38,11 @@ public function __construct(\Zookeeper $zookeeper) public static function createConnection(string $dsn): \Zookeeper { if (0 !== strpos($dsn, 'zookeeper:')) { - throw new InvalidArgumentException(sprintf('Unsupported DSN: %s.', $dsn)); + throw new InvalidArgumentException(sprintf('Unsupported DSN: "%s".', $dsn)); } if (false === $params = parse_url($dsn)) { - throw new InvalidArgumentException(sprintf('Invalid Zookeeper DSN: %s.', $dsn)); + throw new InvalidArgumentException(sprintf('Invalid Zookeeper DSN: "%s".', $dsn)); } $host = $params['host'] ?? '';