Apply suggestions from code review
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
parent
ed4a18f079
commit
d9d30d9555
2 changed files with 6 additions and 6 deletions
|
@ -1668,9 +1668,9 @@ class Contact
|
|||
* @param integer $cid contact id
|
||||
* @return string avatar link
|
||||
*/
|
||||
public static function getAvatarForContact(int $cid):string
|
||||
public static function getAvatarUrlForId(int $cid):string
|
||||
{
|
||||
return DI::baseUrl() . '/photo/contact/'. $cid;
|
||||
return DI::baseUrl() . '/photo/contact/' . $cid;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1679,9 +1679,9 @@ class Contact
|
|||
* @param integer $cid contact id
|
||||
* @return string header link
|
||||
*/
|
||||
public static function getHeaderForContact(int $cid):string
|
||||
public static function getHeaderUrlForId(int $cid):string
|
||||
{
|
||||
return DI::baseUrl() . '/photo/header/'. $cid;
|
||||
return DI::baseUrl() . '/photo/header/' . $cid;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -112,9 +112,9 @@ class Account extends BaseDataTransferObject
|
|||
|
||||
$this->note = BBCode::convert($publicContact['about'], false);
|
||||
$this->url = $publicContact['url'];
|
||||
$this->avatar = (($userContact['photo'] ?? '') ?: $publicContact['photo']) ?: Contact::getAvatarForContact(($userContact['id'] ?? 0) ?: $publicContact['id']);
|
||||
$this->avatar = $userContact['photo'] ?? '' ?: $publicContact['photo'] ?: Contact::getAvatarUrlForId($userContact['id'] ?? 0 ?: $publicContact['id']);
|
||||
$this->avatar_static = $this->avatar;
|
||||
$this->header = Contact::getHeaderForContact(($userContact['id'] ?? 0) ?: $publicContact['id']);
|
||||
$this->header = Contact::getHeaderUrlForId($userContact['id'] ?? 0 ?: $publicContact['id']);
|
||||
$this->header_static = $this->header;
|
||||
$this->followers_count = $apcontact['followers_count'] ?? 0;
|
||||
$this->following_count = $apcontact['following_count'] ?? 0;
|
||||
|
|
Loading…
Reference in a new issue