Typing and static declaration in PoCo class

This commit is contained in:
Mikael Nordfeldth 2013-10-06 03:48:41 +02:00
parent 64dbd93534
commit 5f867f98c2
2 changed files with 3 additions and 11 deletions

View File

@ -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();

View File

@ -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
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;