]> git.mxchange.org Git - friendica.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sun, 13 May 2018 03:36:47 +0000 (05:36 +0200)
committerRoland Häder <roland@mxchange.org>
Mon, 14 May 2018 20:50:05 +0000 (22:50 +0200)
- you can directly use constant($var) instead of this switch()

Signed-off-by: Roland Häder <roland@mxchange.org>
src/Protocol/PortableContact.php

index 672956ffb952fe492b23262b9031fe55e3f8e6ee..50b903fb02c4e1469c664dd747a3f05ad0a98d98 100644 (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;
-                                       }
                                }
                        }
                }