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

Patch coverage has no change and project coverage change: -33.32% ⚠️

Comparison is base (4c0a00f) 48.91% compared to head (8e34520) 15.60%.

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     
Files Changed Coverage Δ
framework/console/controllers/ServeController.php 0.00% <ø> (-11.33%) ⬇️
framework/db/BaseActiveRecord.php 71.99% <ø> (-2.45%) ⬇️

... and 264 files with indirect coverage changes

☔ 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.

None yet

3 participants