diff --git a/src/Client.php b/src/Client.php index 1c751c7..2b2c5ba 100644 --- a/src/Client.php +++ b/src/Client.php @@ -69,7 +69,7 @@ class Client public static function instance($name = 'default') { if (! isset(self::$instances[$name])) { - self::$instances[$name] = new Client($name); + self::$instances[$name] = new static($name); } return self::$instances[$name]; } diff --git a/tests/LateStaticClient.php b/tests/LateStaticClient.php new file mode 100644 index 0000000..9f06fb5 --- /dev/null +++ b/tests/LateStaticClient.php @@ -0,0 +1,8 @@ +assertTrue($instance instanceof LateStaticClient); + } + +}