-
Notifications
You must be signed in to change notification settings - Fork 2k
refactor: Improve types for phpstan #9685
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
base: develop
Are you sure you want to change the base?
Conversation
I'm not a fan either of duplicating code comments and PHPDocs. If those are already defined by the base class or interface, then child classes can remove them since, as you said, IDEs will show you the inherited code comments (unless you are not using an IDE?). It is also a maintenance burden to keep similar comments in sync. |
If I'm not mistaken, @samsonasik is against deletion. |
can |
Why? Inheritance works fine without it. Maybe the tag is needed when generating documentation? I don't see the need for it during development. Look at |
If I remember correctly, |
Tags should be updated if the type changes or becomes more precise ( |
Yes, they should be updated. |
If phpDocumentor requires |
Okay. Can we fix the style in the Markdown guidelines or user guide? I would like to have an exact strategy for further refactoring (example Commands, Request, Model,..). It may be necessary to remove all "bad" files from the comments. Alternatively, you can add This may reduce the size of the installation ZIP archive. |
👋 Hi, @neznaika0! |
Description
Improved typing.
What is done:
CIUnitTestCase
, the dependent code has been updatedOFFTOP: I'll ask again: Do we really need repeated code descriptions? (You answered Yes.)
Because of this, it needs to be fixed in several places. See, example
$namespace
property. Modern IDEs fully support type highlighting and you can switch to declarations. If not, then is it worth adding missing comments everywhere? I would leave it as it is now, but this contradicts the desire to duplicate the code: Everywhere without repeating, or always duplicate typing.Checklist: