Closed (duplicate)
Project:
Drupal core
Version:
8.9.x-dev
Component:
base system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
4 Mar 2014 at 16:57 UTC
Updated:
30 Apr 2021 at 12:12 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
donquixote commentedComment #2
donquixote commentedBtw, another issue:
PhpStorm (any mabye other IDEs, who knows) has problems if a class alias has the same name as a function.
(and this is not case sensitive, for obvious reasons)
E.g.
One way out could be to rename these two aliases.
Comment #3
donquixote commentedThis commit can fix the issue mentioned in #2:
https://github.com/donquixote/drupal/commit/1e77fe7e3eddadefab1e480340db...
Comment #4
cameron tod commentedGreat to see these unused classes not taking up cognitive space.
Shouldn't this parameter be documented?
This is much more readable, but I'm not sure if matches Drupal's coding standard.
Grepping through the D8 codebase, there's a lot of code that needs updating the new standards here: #711918: Documentation standard for @param and @return data types
More broadly though, there seems to be an issue for this (and the rest of core) already: #1518116: [meta] Make Core pass Coder Review
Comment #5
donquixote commented#711918: Documentation standard for @param and @return data types
discusses the introduction of the standards but not their implementation
#1518116: [meta] Make Core pass Coder Review
is a meta issue, no patches going to happen there.
#1533094: Make includes directory, files starting with A-C pass Coder Review
this seems like exactly the right place!
Comment #6
donquixote commentedThe other issues are a dead end.
#1326456-29: Add missing @param in includes A-C, plus other corrections to some docblocks
I worked some more on the patch and I am going to post one that focuses on the docblock.
Comment #7
donquixote commentedCombined branch with docblock AND code style improvements merged together:
https://github.com/donquixote/drupal/compare/8.x-bootstrap-inc
Only code style:
https://github.com/donquixote/drupal/compare/8.x-codestyle-bootstrap-inc
This part contains some controversial commits that I would like to get further opinions on.
Only docblock:
https://github.com/donquixote/drupal/compare/8.x-docblock-bootstrap-inc
@everyone, reviewers:
Please let me know if you want to focus on docblock only or the combined patch.
Comment #8
donquixote commented"needs review"
Comment #11
donquixote commented7: D8-2210565-7-bootstrap-inc-codestyle.patch queued for re-testing.
Comment #12
donquixote commentedhttps://github.com/donquixote/drupal/commit/1fc4f5453351b43fd9a3227dc963...
drupal_page_get_cache() returns an "object" with no type specified, whereas drupal_serve_page_from_cache($cache, ..) requires a stdClass object as the first parameter. Just assuming that object is a stdClass seems wrong. But the proposed solution seems overkill.
Comment #14
donquixote commentedThe "Remove local variables" on drupal_settings_initialize() was a bad idea.
https://github.com/donquixote/drupal/commit/dc67d8827d194c5b860e6147a72b...
The "unused" variables are used in settings.php.
I am not sure for watchdog(). I don't see any require/include or compact() or anything, so I assume that $base_root is really not used anywhere in the function.
Comment #15
donquixote commentedhttps://github.com/donquixote/drupal/compare/8.x-bootstrap-inc
EDIT: As already mentioned in #7:
https://github.com/donquixote/drupal/compare/8.x-bootstrap-inc
https://github.com/donquixote/drupal/compare/8.x-codestyle-bootstrap-inc
This part contains some controversial commits that I would like to get further opinions on.
https://github.com/donquixote/drupal/compare/8.x-docblock-bootstrap-inc
Please let me know if I should focus on docblock only or the combined patch.
Comment #16
jhedstromComment #17
sushylRerolled Combined from #15 patch. Uploading patch for testing.
Comment #18
googletorp commentedComment #20
sushyl8.0.x/8.1.x
Rerolled patch
Comment #29
quietone commentedThanks for the patch. However, we have a number of issues dealing with coding standards fixes and the community has decided that the best way to approach this is by fixing a rule at a time, rather than a file at a time. See #2571965: [meta] Fix PHP coding standards in core, stage 1 for the meta issue where this effort is being organized,
Closing this as a duplicate of #3207949: Fix Drupal.Commenting.FunctionComment.MissingParamType and adding credit over there.