WisdmLabs / moodle-block_edwiser_site_monitor

GNU General Public License v3.0
6 stars 4 forks source link

lib.php and function name convention #1

Closed ak4t0sh closed 5 years ago

ak4t0sh commented 5 years ago

As described in https://docs.moodle.org/dev/Plugin_files#lib.php :

All the plugin's internal logic should be implemented in the auto-loaded classes or in the locallib.php file.

So your functions should be moved to locallib.php

Moreover to prevent namespace collision you should always use frankenstyle style for your constants and function's name (https://docs.moodle.org/dev/Coding_style#Functions_and_Methods, https://docs.moodle.org/dev/Coding_style#Constants)

ak4t0sh commented 5 years ago

Your constants do not use franskenstyle prefix but just EDWISER_ do not you risk collisions with your others plugins?

wisdmyogeshshirsath commented 5 years ago

I'll make sure that this constant will not collide with other plugins. In fist update, I'll change this constant to plugin specific franskenstyle prefix constant.