mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 20:44:28 +09:00
Remove object return type declaration for compatibility with PHP < 7.2
This commit is contained in:
parent
eb2c9d0aed
commit
f02c4aa4c4
2 changed files with 7 additions and 7 deletions
|
|
@ -24,15 +24,15 @@ class ModuleActionParser
|
||||||
* Load an XML file.
|
* Load an XML file.
|
||||||
*
|
*
|
||||||
* @param string $filename
|
* @param string $filename
|
||||||
* @return object
|
* @return object|false
|
||||||
*/
|
*/
|
||||||
public static function loadXML(string $filename): object
|
public static function loadXML(string $filename)
|
||||||
{
|
{
|
||||||
// Load the XML file.
|
// Load the XML file.
|
||||||
$xml = simplexml_load_file($filename);
|
$xml = simplexml_load_file($filename);
|
||||||
if ($xml === false)
|
if ($xml === false)
|
||||||
{
|
{
|
||||||
return new \stdClass;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the current language.
|
// Get the current language.
|
||||||
|
|
@ -178,7 +178,7 @@ class ModuleActionParser
|
||||||
* @param string $route
|
* @param string $route
|
||||||
* @return object
|
* @return object
|
||||||
*/
|
*/
|
||||||
public static function analyzeRoute(string $route): object
|
public static function analyzeRoute(string $route)
|
||||||
{
|
{
|
||||||
// Replace variables in the route definition into appropriate regexp.
|
// Replace variables in the route definition into appropriate regexp.
|
||||||
$var_regexp = '#\\$([a-z0-9_]+)(?::(' . implode('|', array_keys(self::$_shortcuts)) . '))?#i';
|
$var_regexp = '#\\$([a-z0-9_]+)(?::(' . implode('|', array_keys(self::$_shortcuts)) . '))?#i';
|
||||||
|
|
|
||||||
|
|
@ -11,15 +11,15 @@ class ModuleInfoParser
|
||||||
* Load an XML file.
|
* Load an XML file.
|
||||||
*
|
*
|
||||||
* @param string $filename
|
* @param string $filename
|
||||||
* @return object
|
* @return object|false
|
||||||
*/
|
*/
|
||||||
public static function loadXML(string $filename): object
|
public static function loadXML(string $filename)
|
||||||
{
|
{
|
||||||
// Load the XML file.
|
// Load the XML file.
|
||||||
$xml = simplexml_load_file($filename);
|
$xml = simplexml_load_file($filename);
|
||||||
if ($xml === false)
|
if ($xml === false)
|
||||||
{
|
{
|
||||||
return new \stdClass;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the current language.
|
// Get the current language.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue