Skip to content

Commit 3d3a3b6

Browse files
authored
Merge pull request #97 from php-db/0.3.x
0.3.3-merge-up-into-0.4.x
2 parents c780605 + b6d55ff commit 3d3a3b6

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

src/Adapter/Driver/Pdo/AbstractPdo.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ abstract class AbstractPdo implements PdoDriverInterface, ProfilerAwareInterface
3131
protected ?ProfilerInterface $profiler;
3232

3333
public function __construct(
34-
protected readonly AbstractPdoConnection|PDO $connection,
35-
protected readonly StatementInterface&PdoDriverAwareInterface $statementPrototype,
36-
protected readonly ResultInterface $resultPrototype,
34+
protected AbstractPdoConnection|PDO $connection,
35+
protected StatementInterface&PdoDriverAwareInterface $statementPrototype,
36+
protected ResultInterface $resultPrototype,
3737
array $features = [],
3838
) {
3939
if ($this->connection instanceof PdoDriverAwareInterface) {

src/Container/AdapterAbstractServiceFactory.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class AdapterAbstractServiceFactory implements AbstractFactoryInterface
2525
/**
2626
* Can we create an adapter by the requested name?
2727
*/
28-
public function canCreate(ContainerInterface $container, string $requestedName): bool
28+
public function canCreate(ContainerInterface $container, $requestedName): bool
2929
{
3030
$config = $this->getConfig($container);
3131
if (empty($config)) {
@@ -42,14 +42,13 @@ public function canCreate(ContainerInterface $container, string $requestedName):
4242
*/
4343
public function __invoke(
4444
ContainerInterface $container,
45-
string $requestedName,
45+
$requestedName,
4646
?array $options = null
4747
): AdapterInterface {
4848
$driverFactory = ($container->get(DriverInterfaceFactoryFactoryInterface::class))($container, $requestedName);
4949
$driverInstance = $driverFactory::createFromConfig($container, $requestedName);
5050
$platformFactory = ($container->get(PlatformInterfaceFactoryFactoryInterface::class))();
5151

52-
//$config = $this->getConfig($container);
5352
return new Adapter(
5453
$driverInstance,
5554
$platformFactory::fromDriver($driverInstance),
@@ -59,10 +58,8 @@ public function __invoke(
5958

6059
/**
6160
* Get db configuration, if any
62-
*
63-
* @return array
6461
*/
65-
protected function getConfig(ContainerInterface $container)
62+
protected function getConfig(ContainerInterface $container): array
6663
{
6764
if ($this->config !== null) {
6865
return $this->config;

0 commit comments

Comments
 (0)