-
-
Notifications
You must be signed in to change notification settings - Fork 23
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Another one:
$sql = 'SELECT COUNT(*) count FROM package p WHERE p.suspect IS NOT NULL AND (p.replacementPackage IS NULL OR p.replacementPackage != "spam/spam")';
return (int) $this->getEntityManager()->getConnection()->fetchOne($sql);
triggers Cannot cast mixed to int
Seems to me like count is a clear case of returning int, but maybe I missed something :)
Seems like support should work as per
phpstan-dba/tests/default/data/pdo.php
Lines 155 to 160 in 5227c73
| public function aggregateFunctions(PDO $pdo) | |
| { | |
| $query = 'SELECT MAX(adaid), MIN(adaid), COUNT(adaid), AVG(adaid) FROM ada WHERE adaid = 1'; | |
| $stmt = $pdo->query($query, PDO::FETCH_ASSOC); | |
| assertType('PDOStatement<array{MAX(adaid): int<-2147483648, 2147483647>|null, MIN(adaid): int<-2147483648, 2147483647>|null, COUNT(adaid): int, AVG(adaid): float|null}>', $stmt); | |
| } |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working