mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
MDL-72292 core: add param type and polishing
This commit is contained in:
parent
8583feb724
commit
b20cca2690
1 changed files with 13 additions and 11 deletions
|
@ -1203,18 +1203,20 @@ $cache = '.var_export($cache, true).';
|
|||
* and the value is the new class name.
|
||||
* It is only included when we are populating the component cache. After that is not needed.
|
||||
*
|
||||
* @param string $fulldir
|
||||
* @param string|null $fulldir The directory to the renamed classes.
|
||||
*/
|
||||
protected static function load_renamed_classes($fulldir) {
|
||||
if (isset($fulldir)) {
|
||||
$file = $fulldir . '/db/renamedclasses.php';
|
||||
if (is_readable($file)) {
|
||||
$renamedclasses = null;
|
||||
require($file);
|
||||
if (is_array($renamedclasses)) {
|
||||
foreach ($renamedclasses as $oldclass => $newclass) {
|
||||
self::$classmaprenames[(string)$oldclass] = (string)$newclass;
|
||||
}
|
||||
protected static function load_renamed_classes(?string $fulldir) {
|
||||
if (is_null($fulldir)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$file = $fulldir . '/db/renamedclasses.php';
|
||||
if (is_readable($file)) {
|
||||
$renamedclasses = null;
|
||||
require($file);
|
||||
if (is_array($renamedclasses)) {
|
||||
foreach ($renamedclasses as $oldclass => $newclass) {
|
||||
self::$classmaprenames[(string)$oldclass] = (string)$newclass;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue