From 682587dcf61ba103de794a0868b9cb1f943e6e5a Mon Sep 17 00:00:00 2001 From: "Paul M. Jones" Date: Sat, 7 Apr 2018 11:19:27 -0500 Subject: [PATCH] explicit class names --- src/Connection.php | 6 +++--- src/ConnectionLocator.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Connection.php b/src/Connection.php index 7f7ca11..7baa385 100644 --- a/src/Connection.php +++ b/src/Connection.php @@ -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); }; } diff --git a/src/ConnectionLocator.php b/src/ConnectionLocator.php index 37b1198..de44950 100644 --- a/src/ConnectionLocator.php +++ b/src/ConnectionLocator.php @@ -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(