Skip to content

Commit 953a1c5

Browse files
authored
Set more specific result type in Connection methods (#324)
1 parent 877127f commit 953a1c5

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
- Enh #320: Update according changes in `ColumnSchemaInterface` (@Tigrov)
1616
- New #322: Add `ColumnDefinitionBuilder` class (@Tigrov)
1717
- Enh #323: Refactor `Dsn` class (@Tigrov)
18+
- Enh #324: Set more specific result type in `Connection` methods `createCommand()` and `createTransaction()` (@vjik)
1819

1920
## 1.2.0 March 21, 2024
2021

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
"vimeo/psalm": "^5.25",
4848
"yiisoft/aliases": "^2.0",
4949
"yiisoft/cache-file": "^3.1",
50-
"yiisoft/json": "^1.0",
5150
"yiisoft/var-dumper": "^1.5"
5251
},
5352
"autoload": {

src/Connection.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@
55
namespace Yiisoft\Db\Sqlite;
66

77
use Yiisoft\Db\Driver\Pdo\AbstractPdoConnection;
8-
use Yiisoft\Db\Driver\Pdo\PdoCommandInterface;
98
use Yiisoft\Db\QueryBuilder\QueryBuilderInterface;
109
use Yiisoft\Db\Schema\Quoter;
1110
use Yiisoft\Db\Schema\QuoterInterface;
1211
use Yiisoft\Db\Schema\SchemaInterface;
13-
use Yiisoft\Db\Transaction\TransactionInterface;
1412

1513
use function str_starts_with;
1614

@@ -34,7 +32,7 @@ public function __clone()
3432
}
3533
}
3634

37-
public function createCommand(string $sql = null, array $params = []): PdoCommandInterface
35+
public function createCommand(string $sql = null, array $params = []): Command
3836
{
3937
$command = new Command($this);
4038

@@ -53,7 +51,7 @@ public function createCommand(string $sql = null, array $params = []): PdoComman
5351
return $command->bindValues($params);
5452
}
5553

56-
public function createTransaction(): TransactionInterface
54+
public function createTransaction(): Transaction
5755
{
5856
return new Transaction($this);
5957
}

0 commit comments

Comments
 (0)