Commit 7038f1b
committed
Fix PHPStan type checking issue in GetAssociationTypeCodeByAssociationIdQuery
This commit addresses the PHPStan error "Cannot access offset 'code' on mixed"
by using getScalarResult() instead of getOneOrNullResult().
Changes made:
- Changed from getOneOrNullResult() to getScalarResult()
- Updated array access to $result[0]['code'] to properly access scalar results
- Maintained null coalescing operator for handling empty results
Using getScalarResult() provides better type safety as it returns a well-defined
array structure that PHPStan can properly analyze, eliminating the type
checking warnings.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent b84f9c2 commit 7038f1b
File tree
1 file changed
+2
-2
lines changed- src/Doctrine/Query
1 file changed
+2
-2
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
0 commit comments