forked from GNUsocial/gnu-social
Typing and static declaration in PoCo class
This commit is contained in:
parent
64dbd93534
commit
5f867f98c2
@ -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();
|
||||||
|
|
||||||
|
12
lib/poco.php
12
lib/poco.php
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user