mirror of
https://github.com/scummvm/scummvm-web.git
synced 2026-11-18 21:35:12 +00:00
WEB: Auto-fix to PSR-2 standard
This commit is contained in:
1 parent
9d06648394
commit
851bb41bb7
52 files changed
+2501
-2328
No files matched your search
@@ -3,17 +3,18 @@
|
||||
* The BasicObject class is inherited by all other objects and houses all common
|
||||
* functions.
|
||||
*/
|
||||
abstract class BasicObject {
|
||||
/**
|
||||
* If the input array doesn't contain the numerical key 0, wrap it inside
|
||||
* an array. This functions operates on the data directly.
|
||||
*
|
||||
* @param mixed &$data the input
|
||||
*/
|
||||
static public function toArray(&$data) {
|
||||
if (!is_array($data) || !array_key_exists(0, $data)) {
|
||||
$data = array($data);
|
||||
}
|
||||
}
|
||||
abstract class BasicObject
|
||||
{
|
||||
/**
|
||||
* If the input array doesn't contain the numerical key 0, wrap it inside
|
||||
* an array. This functions operates on the data directly.
|
||||
*
|
||||
* @param mixed &$data the input
|
||||
*/
|
||||
public static function toArray(&$data)
|
||||
{
|
||||
if (!is_array($data) || !array_key_exists(0, $data)) {
|
||||
$data = array($data);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in new issue
Block a user