staabm / phpstan-dba

PHPStan based SQL static analysis and type inference for the database access layer
https://staabm.github.io/archive.html#phpstan-dba
MIT License
250 stars 17 forks source link

SQL AST: min/max/avg improvements (#587) #587

Closed hemberger closed 1 year ago

hemberger commented 1 year ago

Fix the avg return type extension using the following rules for its return value:

Put min/max in their own return type extension, since their behavior is sufficiently different from avg. They return the input type, but if any input is a string, then the return value is stringified.

Closes #578.

staabm commented 1 year ago

thank you. great work

staabm commented 1 year ago

Sorry, I managed to scramble the commit message somehow