Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/default/DbaInferenceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public function dataFileAsserts(): iterable
yield from $this->gatherAssertTypes(__DIR__.'/data/pdo-default-fetch-types.php');
yield from $this->gatherAssertTypes(__DIR__.'/data/bug372.php');
yield from $this->gatherAssertTypes(__DIR__.'/data/inference-placeholder.php');
yield from $this->gatherAssertTypes(__DIR__.'/data/bug394.php');
}

/**
Expand Down
19 changes: 19 additions & 0 deletions tests/default/data/bug394.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

namespace Bug394;

class X {
/**
* @var \Doctrine\DBAL\Connection
*/
private $conn;

public function bug394(mixed $conditionId)
{
if ($conditionId !== null) {
$query = 'SELECT email, adaid FROM ada WHERE adaid = ?';
$fetchResult = $this->conn->fetchAssociative($query, [$conditionId]);
assertType('array{email: string, adaid: int<-32768, 32767>}|false', $fetchResult);
}
}
}