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

Remove unnecessary type #19932

Merged
merged 1 commit into from
Aug 18, 2023
Merged

Remove unnecessary type #19932

merged 1 commit into from
Aug 18, 2023

Conversation

markhuot
Copy link
Contributor

Because Web and Console application extend Base application there is no need to specify it.

Actually, PHPStan narrows this to just BaseApplication because it is the only consistent type of the three so you lose Web and Console Application type hints.

See, https://phpstan.org/r/d21fb99f-c436-480b-99c2-32df35ec07fa

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Fixed issues Fixes PHPStan's ability to reason about the Yii::$app static property

Because Web and Console application extend Base application there is no need to specify it.

Actually, PHPStan narrows this to _just_ BaseApplication because it is the only consistent type of the three so you lose Web and Console Application type hints.

See, https://phpstan.org/r/d21fb99f-c436-480b-99c2-32df35ec07fa
@what-the-diff
Copy link

what-the-diff bot commented Aug 17, 2023

PR Summary

  • Updating 'var' Annotation for 'static $app' Property
    The technical details within our software that provide descriptions to some of its elements (known as 'annotations') have been updated. Particularly, the characteristics of 'static $app' a property in 'BaseYii.php' from our framework has been refined to offer a more accurate representation, enhancing the overall coding efficiency.

@codecov
Copy link

codecov bot commented Aug 17, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (73902f0) 48.90% compared to head (b0b25f1) 48.90%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #19932   +/-   ##
=======================================
  Coverage   48.90%   48.90%           
=======================================
  Files         445      445           
  Lines       42806    42806           
=======================================
  Hits        20935    20935           
  Misses      21871    21871           
Files Changed Coverage Δ
framework/BaseYii.php 88.33% <ø> (ø)

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

@samdark samdark merged commit e40fb70 into yiisoft:master Aug 18, 2023
50 checks passed
@markhuot markhuot deleted the markhuot-patch-1 branch August 31, 2023 21:06
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

2 participants