-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
Moodle coding style says that this is how it should be:
/** ... */
class base_class {
/**
* Document the purpose and contract of this method.
*/
funcition do_something(): void {
}
}/** ... */
class sub_class extends base_class {
funcition do_something(): void {
// Just implement the purpopse defined in the base class, so there should not be a duplicate PHPdoc comment here.
}
}However, the PHPdoc checker currently gets this wrong, becuase it only analyses one file at a time.
However, now we rely more on class autoloading, we might finally be able to improve this, at least in the case where:
- this file contains a single class definition.
- This class extends classes/implements interfaces which are autoloadable.
Then, we can parse those files to get a list of public and protected methods, and we can use that in local_moodlecheck_functionsdocumented, to avoid giving warnigns about those funcitions. (Indeed, we could start issuing a warning if there is a comment there.)
lucaboesch
Metadata
Metadata
Assignees
Labels
No labels