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

Fix docblock return type mismatch in DataReader::read() method #20338

Merged
merged 1 commit into from
Mar 14, 2025

Conversation

fetus-hina
Copy link
Contributor

This pull request addresses a mismatch between the docblock return type and the actual behavior of the DataReader::read() method.

Previously, the docblock indicated that the method would return an array, even though false had already been noted in the method’s comment.

This change is trivial, but it helps static analysis tools correctly identify the method’s possible return values.

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Fixed issues

The method's docblock incorrectly stated it always returned an array,
while in practice it can also return `false`.

This change updates the `@return` annotation to correctly specify `array|false`.
Copy link

codecov bot commented Mar 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.85%. Comparing base (e38f62e) to head (ee32994).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master   #20338   +/-   ##
=========================================
  Coverage     64.85%   64.85%           
  Complexity    11437    11437           
=========================================
  Files           431      431           
  Lines         37199    37199           
=========================================
  Hits          24125    24125           
  Misses        13074    13074           

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@samdark samdark merged commit c447d95 into yiisoft:master Mar 14, 2025
85 of 87 checks passed
@samdark
Copy link
Member

samdark commented Mar 14, 2025

Thank you!

@fetus-hina fetus-hina deleted the return-type-hint branch March 14, 2025 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants