Skip to content

Commit 0755935

Browse files
committed
try reproduce bug #394
1 parent 6a172b0 commit 0755935

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

Diff for: tests/default/DbaInferenceTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ public function dataFileAsserts(): iterable
6565
yield from $this->gatherAssertTypes(__DIR__.'/data/pdo-default-fetch-types.php');
6666
yield from $this->gatherAssertTypes(__DIR__.'/data/bug372.php');
6767
yield from $this->gatherAssertTypes(__DIR__.'/data/inference-placeholder.php');
68+
yield from $this->gatherAssertTypes(__DIR__.'/data/bug394.php');
6869
}
6970

7071
/**

Diff for: tests/default/data/bug394.php

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
namespace Bug394;
4+
5+
class X {
6+
/**
7+
* @var \Doctrine\DBAL\Connection
8+
*/
9+
private $conn;
10+
11+
public function bug394($sequence)
12+
{
13+
if ($sequence['conditionId'] !== null) {
14+
$query = 'SELECT email, adaid FROM ada WHERE adaid = ?';
15+
$fetchResult = $this->conn->fetchAssociative($query, [$sequence['conditionId']]);
16+
assertType('array{email: string, adaid: int<-32768, 32767>}|false', $fetchResult);
17+
}
18+
}
19+
}
20+
21+

0 commit comments

Comments
 (0)