mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-16 13:07:46 +02:00
refactor: add rector to enforce type declarations, code quality + style and remove dead code
- update CI process to include quality stage (tests + code review) - add captainhook to install git pre-commit & pre-push hooks - remove .devcontainer Dockerfile to use project's docker-compose services: all services can now be started automatically using vscode - update docs/setup-development.md
This commit is contained in:
parent
a54a5964c3
commit
5c5c6da4be
302 changed files with 9802 additions and 4674 deletions
|
|
@ -11,10 +11,15 @@
|
|||
|
||||
namespace ActivityPub\Objects;
|
||||
|
||||
use ActivityPub\Core\Activity;
|
||||
use CodeIgniter\Pager\Pager;
|
||||
use ActivityPub\Core\ObjectType;
|
||||
|
||||
class OrderedCollectionObject extends ObjectType
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $type = 'OrderedCollection';
|
||||
|
||||
/**
|
||||
|
|
@ -43,18 +48,19 @@ class OrderedCollectionObject extends ObjectType
|
|||
protected $orderedItems;
|
||||
|
||||
/**
|
||||
* @param \ActivityPub\Libraries\ActivityPub\Activity[] $orderedItems
|
||||
* @param \CodeIgniter\Pager\Pager $pager
|
||||
* @param array $orderedItems
|
||||
*/
|
||||
public function __construct($orderedItems, $pager = null)
|
||||
{
|
||||
public function __construct(
|
||||
?array $orderedItems = null,
|
||||
?Pager $pager = null
|
||||
) {
|
||||
$this->id = current_url();
|
||||
|
||||
if ($pager) {
|
||||
if ($pager !== null) {
|
||||
$totalItems = $pager->getTotal();
|
||||
$this->totalItems = $totalItems;
|
||||
|
||||
if ($totalItems) {
|
||||
if ($totalItems !== 0) {
|
||||
$this->first = $pager->getPageURI($pager->getFirstPage());
|
||||
$this->current = $pager->getPageURI();
|
||||
$this->last = $pager->getPageURI($pager->getLastPage());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue