Skip to content

Commit 7995b01

Browse files
clxmstaabstaabm
authored andcommitted
support Result->iterateColumn()
1 parent 2995f5a commit 7995b01

File tree

3 files changed

+4
-176
lines changed

3 files changed

+4
-176
lines changed

.phpstan-dba.cache

Lines changed: 0 additions & 176 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Extensions/DoctrineResultDynamicReturnTypeExtension.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ final class DoctrineResultDynamicReturnTypeExtension implements DynamicMethodRet
3131
'fetchallassociative',
3232
'iteratenumeric',
3333
'iterateassociative',
34+
'iteratecolumn',
3435
];
3536

3637
public function getClass(): string

tests/data/doctrine-dbal.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ public function foo(Connection $conn)
3939

4040
$fetch = $result->iterateAssociative();
4141
assertType('Traversable<int, array{email: string, adaid: int<0, 4294967295>, gesperrt: int<-128, 127>, freigabe1u1: int<-128, 127>}>', $fetch);
42+
43+
$fetch = $result->iterateColumn();
44+
assertType('Traversable<int, string>', $fetch);
4245
}
4346

4447
public function executeQuery(Connection $conn, array $types, QueryCacheProfile $qcp)

0 commit comments

Comments
 (0)