Skip to content

Commit

Permalink
narrow types
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Nov 14, 2024
1 parent 7667a3f commit 33ac069
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/QueryReflection/MysqliQueryReflector.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,13 @@ public function getResultType(string $queryString, int $fetchType): ?Type
foreach ($result as $val) {
if (
! property_exists($val, 'name')
|| ! is_string($val->name)
|| ! property_exists($val, 'type')
|| ! is_int($val->type)
|| ! property_exists($val, 'flags')
|| ! is_int($val->flags)
|| ! property_exists($val, 'length')
|| ! is_int($val->length)
) {
throw new ShouldNotHappenException();
}
Expand Down

0 comments on commit 33ac069

Please sign in to comment.