Skip to content

Commit d6ee247

Browse files
Fix
1 parent e56988d commit d6ee247

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/Type/Php/PdoStatementFetchAllReturnTypeExtension.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace PHPStan\Type\Php;
44

5+
use PDO;
56
use PhpParser\Node\Expr\MethodCall;
67
use PHPStan\Analyser\Scope;
78
use PHPStan\DependencyInjection\AutowiredService;
@@ -52,7 +53,11 @@ public function getTypeFromMethodCall(
5253

5354
foreach ($constantIntegers as $constantInteger) {
5455
$mode = $constantInteger->getValue();
55-
if ($mode === 0 || ($mode & 0xFFFF) === \PDO::FETCH_KEY_PAIR || ($mode & \PDO::FETCH_GROUP) !== 0) {
56+
if (
57+
($mode & 0xFFFF) === \PDO::FETCH_KEY_PAIR
58+
|| ($mode & \PDO::FETCH_GROUP) !== 0
59+
|| ($mode & \PDO::FETCH_UNIQUE) !== 0
60+
) {
5661
return null;
5762
}
5863
}

0 commit comments

Comments
 (0)