Skip to content

Commit 68b4764

Browse files
committed
narrow types
1 parent 1439c91 commit 68b4764

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/QueryReflection/MysqliQueryReflector.php

+4
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,13 @@ public function getResultType(string $queryString, int $fetchType): ?Type
9696
foreach ($result as $val) {
9797
if (
9898
! property_exists($val, 'name')
99+
|| ! is_string($val->name)
99100
|| ! property_exists($val, 'type')
101+
|| ! is_int($val->type)
100102
|| ! property_exists($val, 'flags')
103+
|| ! is_int($val->flags)
101104
|| ! property_exists($val, 'length')
105+
|| ! is_int($val->length)
102106
) {
103107
throw new ShouldNotHappenException();
104108
}

0 commit comments

Comments
 (0)