We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e56988d commit d6ee247Copy full SHA for d6ee247
1 file changed
src/Type/Php/PdoStatementFetchAllReturnTypeExtension.php
@@ -2,6 +2,7 @@
2
3
namespace PHPStan\Type\Php;
4
5
+use PDO;
6
use PhpParser\Node\Expr\MethodCall;
7
use PHPStan\Analyser\Scope;
8
use PHPStan\DependencyInjection\AutowiredService;
@@ -52,7 +53,11 @@ public function getTypeFromMethodCall(
52
53
54
foreach ($constantIntegers as $constantInteger) {
55
$mode = $constantInteger->getValue();
- 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
+ ) {
61
return null;
62
}
63
0 commit comments