44
55namespace PhpDb \Container ;
66
7+ use Laminas \ServiceManager \Factory \AbstractFactoryInterface ;
78use PhpDb \Adapter \Adapter ;
89use PhpDb \Adapter \AdapterInterface ;
910use PhpDb \ResultSet \ResultSetInterface ;
1617 *
1718 * Allows configuring several database instances (such as writer and reader).
1819 */
19- class AdapterAbstractServiceFactory
20+ class AdapterAbstractServiceFactory implements AbstractFactoryInterface
2021{
2122 /** @var array */
2223 protected $ config ;
2324
2425 /**
2526 * Can we create an adapter by the requested name?
2627 */
27- public function canCreate (ContainerInterface $ container , string $ requestedName ): bool
28+ public function canCreate (ContainerInterface $ container , $ requestedName ): bool
2829 {
2930 $ config = $ this ->getConfig ($ container );
3031 if (empty ($ config )) {
@@ -41,7 +42,7 @@ public function canCreate(ContainerInterface $container, string $requestedName):
4142 */
4243 public function __invoke (
4344 ContainerInterface $ container ,
44- string $ requestedName ,
45+ $ requestedName ,
4546 ?array $ options = null
4647 ): AdapterInterface {
4748 $ driverFactory = ($ container ->get (DriverInterfaceFactoryFactoryInterface::class))($ container , $ requestedName );
@@ -57,10 +58,8 @@ public function __invoke(
5758
5859 /**
5960 * Get db configuration, if any
60- *
61- * @return array
6261 */
63- protected function getConfig (ContainerInterface $ container )
62+ protected function getConfig (ContainerInterface $ container ): array
6463 {
6564 if ($ this ->config !== null ) {
6665 return $ this ->config ;
0 commit comments