Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
DrupalDefaultEntityController has 7 protected properties defined. None, however, have a docblock to specify what their type is and what they do. They should.
I don't yet grok them enough to know what to put there. If I figure it out I'll see about a patch, but it would be great if someone who knows the entity system better could beat me to it. :-)
Comment | File | Size | Author |
---|---|---|---|
#10 | 807158-morefixes.patch | 5.04 KB | jhodgdon |
#7 | 807158.patch | 1.5 KB | freelock |
#5 | 807158.patch | 1.32 KB | freelock |
Comments
Comment #1
Crell CreditAttribution: Crell commentedReading the code a bit more, it looks like there are also properties that are used that aren't properly defined, such as $this->cache in the constructor. That should be fixed, too. (I'm listing it here since really it's the same fix: Clean up properties in the controller class.)
Comment #2
jhodgdonThis is pretty far from the only class that needs documentation in Drupal. We have a meta-issue about that... but before we do this, we need to agree on standards, which has been languishing in the issue quee for AGES. Sigh.
See:
#718576: [Meta] API documentation for classes and interfaces is incomplete
#718596: Lacking standards for documenting classes, interfaces, methods
Comment #3
jhodgdonThis needs to be postponed until the coding standards are defined for classes. See previous comment.
Comment #4
jhodgdonStandards are now defined:
http://drupal.org/node/1354#classes
Comment #5
freelockAttaching patch with properties documented. Also added protected cache property.
Comment #6
jhodgdonGood start... A couple of formatting issues:
- Please, blank lines before each /**
- Each summary line should be one sentence and end with . and be less than 80 characters if at all possible.
- If you have more information past the summary or past 80 characters, put additional info as paragraphs (blank line after summary line before the extra info). The @var should be last.
Oh. And after you attach a new patch, please set the status to "needs review". That will clue us in that it needs reviewing, and also clue in the test bot to verify that the patch applies and doesn't break anything.
Thanks!
Comment #7
freelockUpdated patch... Thanks!
Comment #9
jhodgdonI'm rerolling and fixing some additional problems, such as spaces at ends of lines, additional missing doc, etc.
Comment #10
jhodgdonComment #11
freelockDouble-checked.
Comment #12
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.