Skip to content

Commit

Permalink
Fix quotes in exception messages
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Mar 16, 2020
1 parent ae5d89e commit b234f66
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Store/StoreFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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();

Expand Down
4 changes: 2 additions & 2 deletions Store/ZookeeperStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'] ?? '';
Expand Down

0 comments on commit b234f66

Please sign in to comment.