Skip to content

Commit

Permalink
Set more specific result type in Connection methods (#324)
Browse files Browse the repository at this point in the history
  • Loading branch information
vjik authored Oct 20, 2024
1 parent 877127f commit 953a1c5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- Enh #320: Update according changes in `ColumnSchemaInterface` (@Tigrov)
- New #322: Add `ColumnDefinitionBuilder` class (@Tigrov)
- Enh #323: Refactor `Dsn` class (@Tigrov)
- Enh #324: Set more specific result type in `Connection` methods `createCommand()` and `createTransaction()` (@vjik)

## 1.2.0 March 21, 2024

Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"vimeo/psalm": "^5.25",
"yiisoft/aliases": "^2.0",
"yiisoft/cache-file": "^3.1",
"yiisoft/json": "^1.0",
"yiisoft/var-dumper": "^1.5"
},
"autoload": {
Expand Down
6 changes: 2 additions & 4 deletions src/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
namespace Yiisoft\Db\Sqlite;

use Yiisoft\Db\Driver\Pdo\AbstractPdoConnection;
use Yiisoft\Db\Driver\Pdo\PdoCommandInterface;
use Yiisoft\Db\QueryBuilder\QueryBuilderInterface;
use Yiisoft\Db\Schema\Quoter;
use Yiisoft\Db\Schema\QuoterInterface;
use Yiisoft\Db\Schema\SchemaInterface;
use Yiisoft\Db\Transaction\TransactionInterface;

use function str_starts_with;

Expand All @@ -34,7 +32,7 @@ public function __clone()
}
}

public function createCommand(string $sql = null, array $params = []): PdoCommandInterface
public function createCommand(string $sql = null, array $params = []): Command
{
$command = new Command($this);

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

public function createTransaction(): TransactionInterface
public function createTransaction(): Transaction
{
return new Transaction($this);
}
Expand Down

0 comments on commit 953a1c5

Please sign in to comment.