mirror of
https://github.com/friendica/friendica
synced 2025-04-21 22:30:11 +00:00
StdClass instead of arrays
This commit is contained in:
parent
07ccfb212b
commit
1bca280eae
2 changed files with 10 additions and 7 deletions
|
@ -24,6 +24,7 @@ namespace Friendica\Object\Api\Mastodon;
|
|||
use Friendica\BaseEntity;
|
||||
use Friendica\Content\Text\BBCode;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* Class Status
|
||||
|
@ -95,7 +96,7 @@ class Status extends BaseEntity
|
|||
* @param array $item
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public function __construct(array $item, Account $account, array $count)
|
||||
public function __construct(array $item, Account $account, stdClass $count)
|
||||
{
|
||||
$this->id = (string)$item['uri-id'];
|
||||
$this->created_at = DateTimeFormat::utc($item['created'], DateTimeFormat::ATOM);
|
||||
|
@ -114,9 +115,9 @@ class Status extends BaseEntity
|
|||
$this->language = null;
|
||||
$this->uri = $item['uri'];
|
||||
$this->url = $item['plink'] ?? null;
|
||||
$this->replies_count = $count['replies'];
|
||||
$this->reblogs_count = $count['reblogs'];
|
||||
$this->favourites_count = $count['favourites'];
|
||||
$this->replies_count = $count->replies;
|
||||
$this->reblogs_count = $count->reblogs;
|
||||
$this->favourites_count = $count->favourites;
|
||||
$this->favourited = false;
|
||||
$this->reblogged = false;
|
||||
$this->muted = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue