mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-14 11:20:53 +08:00
feat: add v2node support
This commit is contained in:
@@ -317,14 +317,14 @@ class Server extends Model
|
||||
return "{$serverKey}:{$userKey}";
|
||||
}
|
||||
|
||||
public static function normalizeType(string $type): string
|
||||
public static function normalizeType(?string $type): string | null
|
||||
{
|
||||
return strtolower(self::TYPE_ALIASES[$type] ?? $type);
|
||||
return $type ? strtolower(self::TYPE_ALIASES[$type] ?? $type) : null;
|
||||
}
|
||||
|
||||
public static function isValidType(string $type): bool
|
||||
|
||||
public static function isValidType(?string $type): bool
|
||||
{
|
||||
return in_array(self::normalizeType($type), self::VALID_TYPES, true);
|
||||
return $type ? in_array(self::normalizeType($type), self::VALID_TYPES, true) : true;
|
||||
}
|
||||
|
||||
public function getAvailableStatusAttribute(): int
|
||||
|
||||
Reference in New Issue
Block a user