<?php
/**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
public function createFromTableRow(array $row, array $postUriIds = []): Entity\Report
{
return new Entity\Report(
- $row['uid'],
$row['reporter-id'],
$row['cid'],
new \DateTime($row['created'] ?? 'now', new \DateTimeZone('UTC')),
$row['comment'],
$row['category'],
+ $row['rules'],
$row['forward'],
$postUriIds,
+ $row['uid'],
$row['id'],
);
}
* @return Entity\Report
* @throws \Exception
*/
- public function createFromReportsRequest(int $uid = null, int $reporterId, int $cid, string $comment = '', string $category = null, bool $forward = false, array $postUriIds = []): Entity\Report
+ public function createFromReportsRequest(int $reporterId, int $cid, string $comment = '', string $category = null, string $rules = '', bool $forward = false, array $postUriIds = [], int $uid = null): Entity\Report
{
return new Entity\Report(
- $uid,
$reporterId,
$cid,
new \DateTime('now', new \DateTimeZone('UTC')),
$comment,
$category,
+ $rules,
$forward,
$postUriIds,
+ $uid,
);
}
}