Continued:

- you can directly use constant($var) instead of this switch()

Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2018-05-13 05:36:47 +02:00
parent fe1e7b92f2
commit 69ac6feff7
No known key found for this signature in database
GPG Key ID: B72F8185C6C7BD78

View File

@ -1316,20 +1316,8 @@ class PortableContact
$version = $data->version;
$site_name = $data->site_name;
$info = $data->info;
$register_policy_str = $data->register_policy;
$register_policy = constant($data->register_policy);
$platform = $data->platform;
switch ($register_policy_str) {
case "REGISTER_CLOSED":
$register_policy = REGISTER_CLOSED;
break;
case "REGISTER_APPROVE":
$register_policy = REGISTER_APPROVE;
break;
case "REGISTER_OPEN":
$register_policy = REGISTER_OPEN;
break;
}
}
}
}