You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.)
The text was updated successfully, but these errors were encountered:
Moodle coding style says that this is how it should be:
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:
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.)
The text was updated successfully, but these errors were encountered: