defined('MOODLE_INTERNAL') || die();
+// Constants used in version.php files, these must exist when core_component executes.
+
+/** Software maturity level - internals can be tested using white box techniques. */
+define('MATURITY_ALPHA', 50);
+/** Software maturity level - feature complete, ready for preview and testing. */
+define('MATURITY_BETA', 100);
+/** Software maturity level - tested, will be released unless there are fatal bugs. */
+define('MATURITY_RC', 150);
+/** Software maturity level - ready for production deployment. */
+define('MATURITY_STABLE', 200);
+/** Any version - special value that can be used in $plugin->dependencies in version.php files. */
+define('ANY_VERSION', 'any');
+
+
/**
* Collection of components related methods.
*/
protected static function fetch_core_version() {
global $CFG;
if (self::$version === null) {
+ $version = null; // Prevent IDE complaints.
require($CFG->dirroot . '/version.php');
self::$version = $version;
}
/** Extremely large memory limit - not recommended for standard scripts */
define('MEMORY_HUGE', -4);
-/**
- * Software maturity levels used by the core and plugins
- */
-define('MATURITY_ALPHA', 50); // internals can be tested using white box techniques
-define('MATURITY_BETA', 100); // feature complete, ready for preview and testing
-define('MATURITY_RC', 150); // tested, will be released unless there are fatal bugs
-define('MATURITY_STABLE', 200); // ready for production deployment
-
-/**
- * Special value that can be used in $plugin->dependencies in version.php files.
- */
-define('ANY_VERSION', 'any');
-
/**
* Simple class. It is usually used instead of stdClass because it looks