cherry pick maniaplanet lib 6.1

This commit is contained in:
Beu
2024-08-25 22:30:06 +02:00
parent 3044e466b9
commit c8bbb3d7c6
18 changed files with 1626 additions and 1698 deletions

View File

@ -27,7 +27,7 @@ class ServerOptions extends AbstractStructure
* @internal
* @return bool
*/
function isValid()
public function isValid(): bool
{
return is_string($this->name)
&& is_string($this->comment)
@ -41,15 +41,16 @@ class ServerOptions extends AbstractStructure
* @internal
* @return mixed[]
*/
function toSetterArray()
public function toSetterArray()
{
$out = array();
foreach(get_object_vars($this) as $key => $value)
{
if(substr($key, 0, 7) == 'current' || $value === null)
$out = [];
foreach (get_object_vars($this) as $key => $value) {
if (str_starts_with($key, 'current') || $value === null) {
continue;
if($key == 'nextUseChangingValidationSeed')
}
if ($key === 'nextUseChangingValidationSeed') {
$key = 'useChangingValidationSeed';
}
$out[ucfirst($key)] = $value;
}
return $out;