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

Docs #19935

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Docs #19935

wants to merge 2 commits into from

Conversation

arshidkv12
Copy link

Q A
Is bugfix?
New feature?
Breaks BC?

@what-the-diff
Copy link

what-the-diff bot commented Aug 22, 2023

PR Summary

  • Update to Return Type Annotation in ServeController.php
    A modification was made in the ServeController.php file. Specifically, the method actionIndex now has an expanded list of possible return types. This simply means that the function can return more kinds of data. It now includes void, which stands for an absence of data, in addition to the previous return type int.

  • Addition of Return Type to OffsetUnset Method in BaseActiveRecord.php
    On the BaseActiveRecord.php file, a helpful change was made. Specifically, the method offsetUnset was given a return type annotation. This is kind of like a label that signifies what kind of data the function can provide. The return type null was added, which indicates that this function may not return any data in some cases.

@codecov
Copy link

codecov bot commented Aug 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 15.60%. Comparing base (4c0a00f) to head (8e34520).
Report is 261 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (4c0a00f) and HEAD (8e34520). Click for more details.

HEAD has 10 uploads less than BASE
Flag BASE (4c0a00f) HEAD (8e34520)
12 2
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #19935       +/-   ##
===========================================
- Coverage   48.91%   15.60%   -33.32%     
===========================================
  Files         445      445               
  Lines       42810    42585      -225     
===========================================
- Hits        20941     6645    -14296     
- Misses      21869    35940    +14071     

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

@@ -1721,6 +1721,7 @@ public function extraFields()
* This method is required by the SPL interface [[\ArrayAccess]].
* It is implicitly called when you use something like `unset($model[$offset])`.
* @param mixed $offset the offset to unset element
* @return null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That doesn't look good since there's no return in the method.

@@ -47,7 +47,7 @@ class ServeController extends Controller
*
* @param string $address address to serve on. Either "host" or "host:port".
*
* @return int
* @return void|int
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no such thing as void|null - it is either a void or int|null

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.

3 participants