Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve type annotations #779

Merged
merged 2 commits into from
Nov 21, 2023
Merged

Improve type annotations #779

merged 2 commits into from
Nov 21, 2023

Conversation

vjik
Copy link
Member

@vjik vjik commented Nov 21, 2023

Q A
Is bugfix?
New feature?
Breaks BC?
Fixed issues -

Copy link

what-the-diff bot commented Nov 21, 2023

PR Summary

  • Enhancement Improve type annotations #779: Clearer Specification of Return and Parameter Types
    Our developers have made the return types of the QueryInterface::all() and CommandInterface::queryAll() methods, and the parameter type for the DbArrayHelper::populate() methods more specific. They are now explicitly labelled as array[]. This provides better clarity and understanding of what these methods will return or accept.

  • Enhancement Improve type annotations #779: Defined Type for 'populate' Closure in BatchQueryResultInterface
    We have defined a specific type for the 'populate' closure in the BatchQueryResultInterface. This makes it clearer what type of closure should be used, reducing room for error or misunderstanding.

  • Bug Fix Fix query count #777: Resolved Issue with Query::count() Return Value
    There was a bug where the Query::count() function could return an incorrect value if the result was greater than PHP_INT_MAX. This has been identified and fixed, ensuring the function now returns precise values regardless of the size.

  • Enhancement Deprecate unnecessary argument $rawSql of AbstractCommand::internalExecute() #778: Removal of Redundant Argument
    The $rawSql argument of the AbstractCommand::internalExecute() method was deemed unnecessary and has been deprecated from the system. This simplifies the method and makes the code cleaner.

In addition to these, we have updated the change log file (CHANGELOG.md) with these new bug fixes and enhancements. Also, necessary adjustments in code files have been made, like modifying function return types and parameter types, removing or adding comments etc., making the overall experience smoother and the codebase more understandable.

Copy link

codecov bot commented Nov 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6845a40) 99.64% compared to head (003d4e8) 99.64%.
Report is 1 commits behind head on master.

❗ Current head 003d4e8 differs from pull request most recent head c054db4. Consider uploading reports for the commit c054db4 to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #779   +/-   ##
=========================================
  Coverage     99.64%   99.64%           
  Complexity     1272     1272           
=========================================
  Files            63       63           
  Lines          3061     3061           
=========================================
  Hits           3050     3050           
  Misses           11       11           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vjik vjik requested a review from a team November 21, 2023 13:08
@vjik vjik added the status:code review The pull request needs review. label Nov 21, 2023
@vjik vjik merged commit 45a5ab6 into master Nov 21, 2023
166 of 169 checks passed
@vjik vjik deleted the improve-annotation branch November 21, 2023 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:code review The pull request needs review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants