Skip to content

Commit 1782779

Browse files
committed
Refactor PlatformInterfaceFactory
Signed-off-by: Joey Smith <jsmith@webinertia.net> Signed-off-by: Joey Smith <jsmith@webinertia.net>
1 parent 8151548 commit 1782779

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Container/PlatformInterfaceFactory.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66

77
use PhpDb\Adapter\Pgsql;
88
use PhpDb\Adapter\Platform\PlatformInterface;
9+
use PhpDb\Exception\ContainerException;
910
use Psr\Container\ContainerInterface;
1011

1112
final class PlatformInterfaceFactory
1213
{
1314
/**
14-
* @throws Pgsql\Exception\ContainerException
15+
* @throws ContainerException
1516
*/
1617
public function __invoke(
1718
ContainerInterface $container,
@@ -24,8 +25,9 @@ public function __invoke(
2425
&& ! $driver instanceof Pgsql\Pdo\Driver
2526
) {
2627
// todo: Once latest PR is merged for 0.5.0 update to use PhpDB\Exception\ContainerException
27-
throw Pgsql\Exception\ContainerException::forServiceFailure(
28+
throw ContainerException::forService(
2829
PlatformInterface::class,
30+
self::class,
2931
'Invalid or missing driver provided'
3032
);
3133
}

0 commit comments

Comments
 (0)