Skip to content

Commit

Permalink
explicit class names
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul M. Jones committed Apr 7, 2018
1 parent 5788cbb commit 682587d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ class Connection
public static function new(...$args) : Connection
{
if ($args[0] instanceof PDO) {
return new static($args[0]);
return new Connection($args[0]);
}

return new static(new PDO(...$args));
return new Connection(new PDO(...$args));
}

public static function factory(...$args) : callable
{
return function () use ($args) {
return static::new(...$args);
return Connection::new(...$args);
};
}

Expand Down
4 changes: 2 additions & 2 deletions src/ConnectionLocator.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ class ConnectionLocator
public static function new(...$args)
{
if ($args[0] instanceof Connection) {
return new static(function () use ($args) {
return new ConnectionLocator(function () use ($args) {
return $args[0];
});
}

return new static(Connection::factory(...$args));
return new ConnectionLocator(Connection::factory(...$args));
}

public function __construct(
Expand Down

0 comments on commit 682587d

Please sign in to comment.