Clean up missing or inconsistent types in Lang, ModuleAction, ModuleInfo parser classes

This commit is contained in:
Kijin Sung 2023-10-03 16:25:35 +09:00
parent df6fdd3bc3
commit 141ee7f7e1
3 changed files with 17 additions and 14 deletions

View file

@ -11,15 +11,15 @@ class ModuleInfoParser extends BaseParser
* Load an XML file.
*
* @param string $filename
* @return object|false
* @return ?object
*/
public static function loadXML(string $filename)
public static function loadXML(string $filename): ?object
{
// Load the XML file.
$xml = simplexml_load_string(file_get_contents($filename));
if ($xml === false)
{
return false;
return null;
}
// Get the current language.