We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 5f867f98 authored by mattl's avatar mattl

Typing and static declaration in PoCo class

parent 64dbd935
...@@ -505,7 +505,7 @@ class ActivityObject ...@@ -505,7 +505,7 @@ class ActivityObject
return $object; return $object;
} }
static function fromGroup($group) static function fromGroup(User_group $group)
{ {
$object = new ActivityObject(); $object = new ActivityObject();
......
...@@ -137,12 +137,8 @@ class PoCo ...@@ -137,12 +137,8 @@ class PoCo
return null; return null;
} }
function fromProfile($profile) static function fromProfile(Profile $profile)
{ {
if (empty($profile)) {
return null;
}
$poco = new PoCo(); $poco = new PoCo();
$poco->preferredUsername = $profile->nickname; $poco->preferredUsername = $profile->nickname;
...@@ -168,12 +164,8 @@ class PoCo ...@@ -168,12 +164,8 @@ class PoCo
return $poco; return $poco;
} }
function fromGroup($group) static function fromGroup(User_group $group)
{ {
if (empty($group)) {
return null;
}
$poco = new PoCo(); $poco = new PoCo();
$poco->preferredUsername = $group->nickname; $poco->preferredUsername = $group->nickname;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment