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
Just for your information, Moodle coding guidelines have somewhat strict guidelines on how (not to) use the namespaced classes. Things like $this->user = new domain\user(); are explicitly discouraged at https://docs.moodle.org/dev/Coding_style#Namespaces
As with any coding style guidelines, this is something you may or may not agree with but it's a result of quite long discussions.
We do not strictly discriminate contributed plugins on the coding style. But I noticed you try to get in line with Moodle coding guidelines so I thought I would let you know here.
The text was updated successfully, but these errors were encountered:
Would this be resolved by adding a "use domain\user as user"
Well, not really. Moodle coding style explicitly states:
Do not use named imports ("use XXX as YYY;") unless it is absolutely required to resolve a conflict.
I am just quoting https://docs.moodle.org/dev/Coding_style#Namespaces here. Please note this is really meant as a note. Of course, you can decide to ignore it (although we generally encourage the community to follow the Moodle coding style for plugins, too).
Just for your information, Moodle coding guidelines have somewhat strict guidelines on how (not to) use the namespaced classes. Things like
$this->user = new domain\user();
are explicitly discouraged at https://docs.moodle.org/dev/Coding_style#NamespacesAs with any coding style guidelines, this is something you may or may not agree with but it's a result of quite long discussions.
We do not strictly discriminate contributed plugins on the coding style. But I noticed you try to get in line with Moodle coding guidelines so I thought I would let you know here.
The text was updated successfully, but these errors were encountered: