diff --git a/docs/out/GroupAPI.md b/docs/out/GroupAPI.md index a4e85fd0..e566614d 100644 --- a/docs/out/GroupAPI.md +++ b/docs/out/GroupAPI.md @@ -349,13 +349,13 @@ // Output: "Hello World" - var_dump( $meeting?->getStatistics()->getPresent()); + var_dump( $meeting->getStatistics()->getPresent()); // Output: 2 - var_dump( $meeting?->getStatistics()->getAbsent()); + var_dump( $meeting->getStatistics()->getAbsent()); // Output: 1 - var_dump( $meeting?->getStatistics()->getUnsure()); + var_dump( $meeting->getStatistics()->getUnsure()); // Output: 0 diff --git a/src/Models/AbstractRequestBuilder.php b/src/Models/AbstractRequestBuilder.php index 38027c65..9059217c 100644 --- a/src/Models/AbstractRequestBuilder.php +++ b/src/Models/AbstractRequestBuilder.php @@ -6,6 +6,7 @@ use CTApi\Exceptions\CTModelException; use CTApi\Exceptions\CTRequestException; use CTApi\Interfaces\UpdatableModel; +use CTApi\Models\Events\Event\Event; use CTApi\Traits\Request\OrderByCondition; use CTApi\Traits\Request\Pagination; use CTApi\Traits\Request\WhereCondition; diff --git a/src/Models/Calendars/Appointment/AppointmentRequestBuilder.php b/src/Models/Calendars/Appointment/AppointmentRequestBuilder.php index 60d7620a..221591d7 100644 --- a/src/Models/Calendars/Appointment/AppointmentRequestBuilder.php +++ b/src/Models/Calendars/Appointment/AppointmentRequestBuilder.php @@ -17,6 +17,9 @@ public function __construct( ) { } + /** + * @return Appointment[] + */ public function get(): array { $options = [ diff --git a/src/Models/Calendars/Calendar/CalendarRequest.php b/src/Models/Calendars/Calendar/CalendarRequest.php index c959c490..2ae905b5 100644 --- a/src/Models/Calendars/Calendar/CalendarRequest.php +++ b/src/Models/Calendars/Calendar/CalendarRequest.php @@ -4,6 +4,9 @@ class CalendarRequest { + /** + * @return Calendar[] + */ public static function all(): array { return (new CalendarRequestBuilder())->all(); diff --git a/src/Models/Calendars/Resource/ResourceBookingsRequestBuilder.php b/src/Models/Calendars/Resource/ResourceBookingsRequestBuilder.php index ee982047..9648d9a9 100644 --- a/src/Models/Calendars/Resource/ResourceBookingsRequestBuilder.php +++ b/src/Models/Calendars/Resource/ResourceBookingsRequestBuilder.php @@ -17,6 +17,9 @@ public function __construct(array $resourceIds) $this->resourceIds = $resourceIds; } + /** + * @return ResourceBooking[] + */ public function get(): array { $options = []; diff --git a/src/Models/Calendars/Resource/ResourceRequest.php b/src/Models/Calendars/Resource/ResourceRequest.php index ea0d39b3..f943f60d 100644 --- a/src/Models/Calendars/Resource/ResourceRequest.php +++ b/src/Models/Calendars/Resource/ResourceRequest.php @@ -4,6 +4,9 @@ class ResourceRequest { + /** + * @return Resource[] + */ public static function all(): array { return (new ResourceRequestBuilder())->all(); diff --git a/src/Models/Calendars/Resource/ResourceRequestBuilder.php b/src/Models/Calendars/Resource/ResourceRequestBuilder.php index 075f1787..39179114 100644 --- a/src/Models/Calendars/Resource/ResourceRequestBuilder.php +++ b/src/Models/Calendars/Resource/ResourceRequestBuilder.php @@ -7,6 +7,9 @@ class ResourceRequestBuilder { + /** + * @return Resource[] + */ public function all(): array { $client = CTClient::getClient(); diff --git a/src/Models/Common/DBField/DBFieldForKeysRequestBuilder.php b/src/Models/Common/DBField/DBFieldForKeysRequestBuilder.php index c3f93510..16bb2769 100644 --- a/src/Models/Common/DBField/DBFieldForKeysRequestBuilder.php +++ b/src/Models/Common/DBField/DBFieldForKeysRequestBuilder.php @@ -15,6 +15,9 @@ public function __construct( ) { } + /** + * @return DBFieldValueContainer[] + */ public function get(): array { $this->allDBFields = DBFieldRequest::all(); diff --git a/src/Models/Common/DBField/DBFieldRequest.php b/src/Models/Common/DBField/DBFieldRequest.php index fec11ca6..421586be 100644 --- a/src/Models/Common/DBField/DBFieldRequest.php +++ b/src/Models/Common/DBField/DBFieldRequest.php @@ -8,6 +8,9 @@ class DBFieldRequest { + /** + * @return DBField[] + */ public static function all(): array { $client = CTClient::getClient(); diff --git a/src/Models/Common/File/FileRequestBuilder.php b/src/Models/Common/File/FileRequestBuilder.php index 8ddfb5c7..112db050 100644 --- a/src/Models/Common/File/FileRequestBuilder.php +++ b/src/Models/Common/File/FileRequestBuilder.php @@ -27,6 +27,9 @@ protected function getApiEndpoint(): string return "/api/files/" . $this->domainType . "/" . $this->domainIdentifier; } + /** + * @return File[] + */ public function get(): array { $ctClient = CTClient::getClient(); diff --git a/src/Models/Common/Search/SearchRequestBuilder.php b/src/Models/Common/Search/SearchRequestBuilder.php index 8d8a7bef..e4ee0d8c 100644 --- a/src/Models/Common/Search/SearchRequestBuilder.php +++ b/src/Models/Common/Search/SearchRequestBuilder.php @@ -23,6 +23,9 @@ public function whereDomainType(string $domainType) return $this; } + /** + * @return SearchResult[] + */ public function get(): array { $options = [ diff --git a/src/Models/Common/Tag/TagRequest.php b/src/Models/Common/Tag/TagRequest.php index c4db553e..8de28d00 100644 --- a/src/Models/Common/Tag/TagRequest.php +++ b/src/Models/Common/Tag/TagRequest.php @@ -4,11 +4,17 @@ class TagRequest { + /** + * @return Tag[] + */ public static function allPersonTags(): array { return (new TagRequestBuilder("persons"))->all(); } + /** + * @return Tag[] + */ public static function allSongTags(): array { return (new TagRequestBuilder("songs"))->all(); diff --git a/src/Models/Common/Tag/TagRequestBuilder.php b/src/Models/Common/Tag/TagRequestBuilder.php index 6301236d..e0f50e64 100644 --- a/src/Models/Common/Tag/TagRequestBuilder.php +++ b/src/Models/Common/Tag/TagRequestBuilder.php @@ -8,7 +8,10 @@ class TagRequestBuilder { - private $tags = []; + /** + * @var Tag[] + */ + private array $tags = []; public function __construct( private string $type @@ -16,6 +19,9 @@ public function __construct( $this->tags = $this->retrieveData(); } + /** + * @return Tag[] + */ private function retrieveData(): array { $client = CTClient::getClient(); @@ -50,6 +56,9 @@ public function findOrFail(int $id): Tag return $tag; } + /** + * @return Tag[] + */ public function all(): array { return $this->tags; diff --git a/src/Models/Events/Absence/AbsencePersonRequestBuilder.php b/src/Models/Events/Absence/AbsencePersonRequestBuilder.php index f8182958..dfec816e 100644 --- a/src/Models/Events/Absence/AbsencePersonRequestBuilder.php +++ b/src/Models/Events/Absence/AbsencePersonRequestBuilder.php @@ -23,6 +23,9 @@ protected function getModelClass(): string return Absence::class; } + /** + * @return Absence[] + */ public function get(): array { $options = []; diff --git a/src/Models/Events/Event/EventAgenda.php b/src/Models/Events/Event/EventAgenda.php index a451c2ed..79c077d9 100644 --- a/src/Models/Events/Event/EventAgenda.php +++ b/src/Models/Events/Event/EventAgenda.php @@ -23,6 +23,9 @@ class EventAgenda extends AbstractModel protected ?string $eventStartPosition = null; protected ?string $calendarId = null; protected ?string $total = null; + /** + * @var EventAgendaItem[] + */ protected array $items = []; @@ -40,6 +43,9 @@ protected function fillArrayType(string $key, array $data): void } } + /** + * @return Song[] + */ public function getSongs(): array { CTLog::getLog()->info('EventAgenda: Collect all songs from agenda.'); @@ -200,7 +206,7 @@ public function setTotal(?string $total): EventAgenda } /** - * @return array + * @return EventAgendaItem[] */ public function getItems(): array { diff --git a/src/Models/Events/Event/EventRequest.php b/src/Models/Events/Event/EventRequest.php index a4ead2d7..e206f3aa 100644 --- a/src/Models/Events/Event/EventRequest.php +++ b/src/Models/Events/Event/EventRequest.php @@ -4,6 +4,9 @@ class EventRequest { + /** + * @return Event[] + */ public static function all(): array { return (new EventRequestBuilder())->all(); diff --git a/src/Models/Events/Service/ServiceFromServiceGroupBuilder.php b/src/Models/Events/Service/ServiceFromServiceGroupBuilder.php index 2ff5611c..ebf23a74 100644 --- a/src/Models/Events/Service/ServiceFromServiceGroupBuilder.php +++ b/src/Models/Events/Service/ServiceFromServiceGroupBuilder.php @@ -11,6 +11,9 @@ public function __construct(int $serviceGroupId) $this->serviceGroupId = $serviceGroupId; } + /** + * @return Service[] + */ public function get(): array { $allServices = ServiceRequest::all(); diff --git a/src/Models/Events/Service/ServiceGroupRequest.php b/src/Models/Events/Service/ServiceGroupRequest.php index 0207a99c..bd3ea7cb 100644 --- a/src/Models/Events/Service/ServiceGroupRequest.php +++ b/src/Models/Events/Service/ServiceGroupRequest.php @@ -4,6 +4,9 @@ class ServiceGroupRequest { + /** + * @return ServiceGroup[] + */ public static function all(): array { return (new ServiceGroupRequestBuilder())->all(); diff --git a/src/Models/Events/Service/ServiceRequest.php b/src/Models/Events/Service/ServiceRequest.php index 617863ba..153baf48 100644 --- a/src/Models/Events/Service/ServiceRequest.php +++ b/src/Models/Events/Service/ServiceRequest.php @@ -4,6 +4,9 @@ class ServiceRequest { + /** + * @return Service[] + */ public static function all(): array { return (new ServiceRequestBuilder())->all(); diff --git a/src/Models/Events/Song/Song.php b/src/Models/Events/Song/Song.php index 5b879a7b..fecccae7 100644 --- a/src/Models/Events/Song/Song.php +++ b/src/Models/Events/Song/Song.php @@ -18,6 +18,9 @@ class Song extends AbstractModel implements UpdatableModel protected ?string $arrangementId = null; protected ?string $name = null; protected ?string $arrangement = null; + /** + * @var SongArrangement[] + */ protected array $arrangements = []; protected ?SongCategory $category = null; protected ?string $category_id = null; @@ -175,7 +178,7 @@ public function setArrangement(?string $arrangement): Song } /** - * @return array + * @return SongArrangement[] */ public function getArrangements(): array { diff --git a/src/Models/Events/Song/SongArrangement.php b/src/Models/Events/Song/SongArrangement.php index ea5a4763..b302bacd 100644 --- a/src/Models/Events/Song/SongArrangement.php +++ b/src/Models/Events/Song/SongArrangement.php @@ -25,7 +25,13 @@ class SongArrangement extends AbstractModel implements UpdatableModel protected ?string $beat = null; protected ?string $duration = null; protected ?string $note = null; + /** + * @var File[] + */ protected array $links = []; + /** + * @var File[] + */ protected array $files = []; public static function getModifiableAttributes(): array @@ -243,7 +249,7 @@ public function setNote(?string $note): SongArrangement } /** - * @return array + * @return File[] */ public function getLinks(): array { @@ -261,7 +267,7 @@ public function setLinks(array $links): SongArrangement } /** - * @return array + * @return File[] */ public function getFiles(): array { diff --git a/src/Models/Events/Song/SongArrangementRequestBuilder.php b/src/Models/Events/Song/SongArrangementRequestBuilder.php index b6e9fa00..93bac40e 100644 --- a/src/Models/Events/Song/SongArrangementRequestBuilder.php +++ b/src/Models/Events/Song/SongArrangementRequestBuilder.php @@ -4,13 +4,22 @@ class SongArrangementRequestBuilder { + /** + * @var SongArrangement[] + */ private array $songArrangements = []; + /** + * @param SongArrangement[] $songArrangements + */ public function __construct(array $songArrangements) { $this->songArrangements = $songArrangements; } + /** + * @return SongArrangement[] + */ public function get(): array { return $this->songArrangements; diff --git a/src/Models/Events/Song/SongCommentRequest.php b/src/Models/Events/Song/SongCommentRequest.php index 4faf7334..117174cf 100644 --- a/src/Models/Events/Song/SongCommentRequest.php +++ b/src/Models/Events/Song/SongCommentRequest.php @@ -7,6 +7,10 @@ */ class SongCommentRequest { + /** + * @param int $arrangementId + * @return SongComment[] + */ public static function getForSongArrangement(int $arrangementId): array { $builder = new SongCommentRequestBuilder($arrangementId); diff --git a/src/Models/Events/Song/SongRequest.php b/src/Models/Events/Song/SongRequest.php index 715c5f91..429f841c 100644 --- a/src/Models/Events/Song/SongRequest.php +++ b/src/Models/Events/Song/SongRequest.php @@ -4,6 +4,9 @@ class SongRequest { + /** + * @return Song[] + */ public static function all(): array { return (new SongRequestBuilder())->all(); diff --git a/src/Models/Events/Song/SongTagRequestBuilder.php b/src/Models/Events/Song/SongTagRequestBuilder.php index 879b9a69..ce396830 100644 --- a/src/Models/Events/Song/SongTagRequestBuilder.php +++ b/src/Models/Events/Song/SongTagRequestBuilder.php @@ -2,6 +2,7 @@ namespace CTApi\Models\Events\Song; +use CTApi\Models\Common\Tag\Tag; use CTApi\Models\Common\Tag\TagRequestBuilder; use CTApi\Traits\Request\AjaxApi; use CTApi\Utils\CTResponseUtil; @@ -15,6 +16,9 @@ public function __construct( ) { } + /** + * @return Tag[] + */ public function get(): array { $songData = $this->getTagData(); diff --git a/src/Models/Events/SongStatistic/SongStatisticRequest.php b/src/Models/Events/SongStatistic/SongStatisticRequest.php index 72735330..97312409 100644 --- a/src/Models/Events/SongStatistic/SongStatisticRequest.php +++ b/src/Models/Events/SongStatistic/SongStatisticRequest.php @@ -4,6 +4,9 @@ class SongStatisticRequest { + /** + * @return SongStatistic[] + */ public static function all(): array { return (new SongStatisticRequestBuilder())->all(); diff --git a/src/Models/Events/SongStatistic/SongStatisticRequestBuilder.php b/src/Models/Events/SongStatistic/SongStatisticRequestBuilder.php index fea234b5..e9e20f06 100644 --- a/src/Models/Events/SongStatistic/SongStatisticRequestBuilder.php +++ b/src/Models/Events/SongStatistic/SongStatisticRequestBuilder.php @@ -51,6 +51,9 @@ public function find(string $arrangementId): ?SongStatistic return null; } + /** + * @return SongStatistic[] + */ public function all(): array { $data = $this->getStatisticData(); diff --git a/src/Models/Groups/Group/Group.php b/src/Models/Groups/Group/Group.php index cc6faef1..c215c5f5 100644 --- a/src/Models/Groups/Group/Group.php +++ b/src/Models/Groups/Group/Group.php @@ -24,6 +24,9 @@ class Group extends AbstractModel protected ?GroupInformation $information = null; protected ?GroupSettings $settings = null; protected array $followUp = []; + /** + * @var GroupRole[] + */ protected array $roles = []; @@ -259,7 +262,7 @@ public function setFollowUp(array $followUp): Group } /** - * @return array + * @return GroupRole[] */ public function getRoles(): array { diff --git a/src/Models/Groups/Group/GroupHierarchieChildrenRequest.php b/src/Models/Groups/Group/GroupHierarchieChildrenRequest.php index a3492172..72bdf4a9 100644 --- a/src/Models/Groups/Group/GroupHierarchieChildrenRequest.php +++ b/src/Models/Groups/Group/GroupHierarchieChildrenRequest.php @@ -12,6 +12,9 @@ public function __construct(private readonly int $groupId) { } + /** + * @return Group[] + */ public function get(): array { $response = CTClient::getClient()->get('api/groups/' . $this->groupId . '/children'); diff --git a/src/Models/Groups/Group/GroupHierarchieParentsRequest.php b/src/Models/Groups/Group/GroupHierarchieParentsRequest.php index 18b34ece..a0268b8a 100644 --- a/src/Models/Groups/Group/GroupHierarchieParentsRequest.php +++ b/src/Models/Groups/Group/GroupHierarchieParentsRequest.php @@ -11,6 +11,9 @@ public function __construct(private readonly int $groupId) { } + /** + * @return Group[] + */ public function get(): array { $response = CTClient::getClient()->get('api/groups/' . $this->groupId . '/parents'); diff --git a/src/Models/Groups/Group/GroupHomepage.php b/src/Models/Groups/Group/GroupHomepage.php index ffb1f9bd..ded8f86b 100644 --- a/src/Models/Groups/Group/GroupHomepage.php +++ b/src/Models/Groups/Group/GroupHomepage.php @@ -268,7 +268,7 @@ public function setMeta(?Meta $meta): GroupHomepage } /** - * @return array + * @return PublicGroup[] */ public function getGroups(): array { diff --git a/src/Models/Groups/Group/GroupRequest.php b/src/Models/Groups/Group/GroupRequest.php index 9a3798d8..43b20aec 100644 --- a/src/Models/Groups/Group/GroupRequest.php +++ b/src/Models/Groups/Group/GroupRequest.php @@ -4,6 +4,9 @@ class GroupRequest { + /** + * @return Group[] + */ public static function all(): array { return (new GroupRequestBuilder())->all(); diff --git a/src/Models/Groups/Group/GroupTagRequestBuilder.php b/src/Models/Groups/Group/GroupTagRequestBuilder.php index eff1ed4b..4462ecd6 100644 --- a/src/Models/Groups/Group/GroupTagRequestBuilder.php +++ b/src/Models/Groups/Group/GroupTagRequestBuilder.php @@ -13,6 +13,9 @@ public function __construct( ) { } + /** + * @return Tag[] + */ public function get(): array { $client = CTClient::getClient(); diff --git a/src/Models/Groups/GroupMeeting/GroupMeetingMemberRequestBuilder.php b/src/Models/Groups/GroupMeeting/GroupMeetingMemberRequestBuilder.php index 151b1759..5abceadf 100644 --- a/src/Models/Groups/GroupMeeting/GroupMeetingMemberRequestBuilder.php +++ b/src/Models/Groups/GroupMeeting/GroupMeetingMemberRequestBuilder.php @@ -13,6 +13,9 @@ public function __construct( ) { } + /** + * @return GroupMeetingMember[] + */ public function get(): array { $client = CTClient::getClient(); diff --git a/src/Models/Groups/GroupMeeting/GroupMeetingRequestBuilder.php b/src/Models/Groups/GroupMeeting/GroupMeetingRequestBuilder.php index 8929350e..318e5571 100644 --- a/src/Models/Groups/GroupMeeting/GroupMeetingRequestBuilder.php +++ b/src/Models/Groups/GroupMeeting/GroupMeetingRequestBuilder.php @@ -15,6 +15,9 @@ public function __construct( ) { } + /** + * @return GroupMeeting[] + */ public function get(): array { $options = []; diff --git a/src/Models/Groups/GroupMember/GroupMemberFieldsRequestBuilder.php b/src/Models/Groups/GroupMember/GroupMemberFieldsRequestBuilder.php index 3b6098eb..3df08722 100644 --- a/src/Models/Groups/GroupMember/GroupMemberFieldsRequestBuilder.php +++ b/src/Models/Groups/GroupMember/GroupMemberFieldsRequestBuilder.php @@ -12,6 +12,9 @@ public function __construct( ) { } + /** + * @return GroupMemberFieldContainer[] + */ public function get(): array { $client = CTClient::getClient(); diff --git a/src/Models/Groups/GroupMember/GroupMemberRequestBuilder.php b/src/Models/Groups/GroupMember/GroupMemberRequestBuilder.php index ab64c34e..ac23301e 100644 --- a/src/Models/Groups/GroupMember/GroupMemberRequestBuilder.php +++ b/src/Models/Groups/GroupMember/GroupMemberRequestBuilder.php @@ -17,6 +17,9 @@ public function __construct(int $groupId) $this->groupId = $groupId; } + /** + * @return GroupMember[] + */ public function get(): array { $data = $this->collectDataFromPages('/api/groups/' . $this->groupId . '/members'); diff --git a/src/Models/Groups/GroupType/GroupTypeRequest.php b/src/Models/Groups/GroupType/GroupTypeRequest.php index c48f91dd..706c12f1 100644 --- a/src/Models/Groups/GroupType/GroupTypeRequest.php +++ b/src/Models/Groups/GroupType/GroupTypeRequest.php @@ -4,6 +4,9 @@ class GroupTypeRequest { + /** + * @return GroupType[] + */ public static function all(): array { return (new GroupTypeRequestBuilder())->all(); diff --git a/src/Models/Groups/GroupTypeRole/GroupTypeRoleRequest.php b/src/Models/Groups/GroupTypeRole/GroupTypeRoleRequest.php index bc8c03df..dcfd231a 100644 --- a/src/Models/Groups/GroupTypeRole/GroupTypeRoleRequest.php +++ b/src/Models/Groups/GroupTypeRole/GroupTypeRoleRequest.php @@ -4,6 +4,9 @@ class GroupTypeRoleRequest { + /** + * @return GroupTypeRole[] + */ public static function all(): array { return (new GroupTypeRoleRequestBuilder())->all(); diff --git a/src/Models/Groups/Person/PersonBirthdayRequestBuilder.php b/src/Models/Groups/Person/PersonBirthdayRequestBuilder.php index 1910a98c..be3fe6b1 100644 --- a/src/Models/Groups/Person/PersonBirthdayRequestBuilder.php +++ b/src/Models/Groups/Person/PersonBirthdayRequestBuilder.php @@ -11,6 +11,9 @@ class PersonBirthdayRequestBuilder use WhereCondition; + /** + * @return BirthdayPerson[] + */ public function get(): array { $options = []; diff --git a/src/Models/Groups/Person/PersonEventRequestBuilder.php b/src/Models/Groups/Person/PersonEventRequestBuilder.php index 52640998..5646d682 100644 --- a/src/Models/Groups/Person/PersonEventRequestBuilder.php +++ b/src/Models/Groups/Person/PersonEventRequestBuilder.php @@ -20,6 +20,9 @@ public function __construct(int $personId) $this->personId = $personId; } + /** + * @return Event[] + */ public function get(): array { $options = []; diff --git a/src/Models/Groups/Person/PersonGroupRequestBuilder.php b/src/Models/Groups/Person/PersonGroupRequestBuilder.php index 0a212926..4f084741 100644 --- a/src/Models/Groups/Person/PersonGroupRequestBuilder.php +++ b/src/Models/Groups/Person/PersonGroupRequestBuilder.php @@ -17,6 +17,9 @@ public function __construct(int $personId) $this->personId = $personId; } + /** + * @return PersonGroup[] + */ public function get(): array { $data = $this->collectDataFromPages('/api/persons/' . $this->personId . '/groups'); diff --git a/src/Models/Groups/Person/PersonRequest.php b/src/Models/Groups/Person/PersonRequest.php index 3e8873a8..adcbf714 100644 --- a/src/Models/Groups/Person/PersonRequest.php +++ b/src/Models/Groups/Person/PersonRequest.php @@ -14,6 +14,9 @@ public static function birthdays(): PersonBirthdayRequestBuilder return new PersonBirthdayRequestBuilder(); } + /** + * @return Person[] + */ public static function all(): array { return (new PersonRequestBuilder())->all(); diff --git a/src/Models/Groups/Person/PersonRequestBuilder.php b/src/Models/Groups/Person/PersonRequestBuilder.php index 393d7d9a..28dbb7b1 100644 --- a/src/Models/Groups/Person/PersonRequestBuilder.php +++ b/src/Models/Groups/Person/PersonRequestBuilder.php @@ -17,6 +17,9 @@ public function whoami(): Person return Person::createModelFromData($data); } + /** + * @return Person[] + */ public function get(): array { $options = [ diff --git a/src/Models/Groups/Person/PersonTagRequestBuilder.php b/src/Models/Groups/Person/PersonTagRequestBuilder.php index 9c6c3ce8..76ae6e44 100644 --- a/src/Models/Groups/Person/PersonTagRequestBuilder.php +++ b/src/Models/Groups/Person/PersonTagRequestBuilder.php @@ -13,6 +13,9 @@ public function __construct( ) { } + /** + * @return Tag[] + */ public function get(): array { $client = CTClient::getClient(); diff --git a/src/Models/Wiki/WikiCategory/WikiCategoryRequest.php b/src/Models/Wiki/WikiCategory/WikiCategoryRequest.php index 73b9f7d8..1dbfbdba 100644 --- a/src/Models/Wiki/WikiCategory/WikiCategoryRequest.php +++ b/src/Models/Wiki/WikiCategory/WikiCategoryRequest.php @@ -4,6 +4,9 @@ class WikiCategoryRequest { + /** + * @return WikiCategory[] + */ public static function all(): array { return (new WikiCategoryRequestBuilder())->all(); diff --git a/src/Models/Wiki/WikiCategory/WikiCategoryRequestBuilder.php b/src/Models/Wiki/WikiCategory/WikiCategoryRequestBuilder.php index 2236758e..57c2b4e2 100644 --- a/src/Models/Wiki/WikiCategory/WikiCategoryRequestBuilder.php +++ b/src/Models/Wiki/WikiCategory/WikiCategoryRequestBuilder.php @@ -9,6 +9,9 @@ class WikiCategoryRequestBuilder { use Pagination; + /** + * @return WikiCategory[] + */ public function all(): array { $data = $this->collectDataFromPages('/api/wiki/categories', []); diff --git a/src/Models/Wiki/WikiPage/WikiPageFilesRequestBuilder.php b/src/Models/Wiki/WikiPage/WikiPageFilesRequestBuilder.php index b1e9312c..864c86a1 100644 --- a/src/Models/Wiki/WikiPage/WikiPageFilesRequestBuilder.php +++ b/src/Models/Wiki/WikiPage/WikiPageFilesRequestBuilder.php @@ -13,6 +13,9 @@ public function __construct(private $wikiCategory, private $pageIdentifier) { } + /** + * @return File[] + */ public function get(): array { try { diff --git a/src/Models/Wiki/WikiPage/WikiPageRequestBuilder.php b/src/Models/Wiki/WikiPage/WikiPageRequestBuilder.php index 758ca618..05241e5d 100644 --- a/src/Models/Wiki/WikiPage/WikiPageRequestBuilder.php +++ b/src/Models/Wiki/WikiPage/WikiPageRequestBuilder.php @@ -15,6 +15,9 @@ public function __construct(int $categoryId) $this->categoryId = $categoryId; } + /** + * @return WikiPage[] + */ public function get(): array { try { diff --git a/src/Models/Wiki/WikiPage/WikiPageTreeNode.php b/src/Models/Wiki/WikiPage/WikiPageTreeNode.php index 492b6a30..39cb8d21 100644 --- a/src/Models/Wiki/WikiPage/WikiPageTreeNode.php +++ b/src/Models/Wiki/WikiPage/WikiPageTreeNode.php @@ -8,6 +8,9 @@ class WikiPageTreeNode { protected ?WikiPage $wikiPage = null; protected ?WikiPageTreeNode $parentNode = null; + /** + * @var WikiPageTreeNode[] + */ protected array $childNodes = []; public static function processWikiPagesReturnRootNode(array $pages): WikiPageTreeNode @@ -117,7 +120,7 @@ public function setParentNode(?WikiPageTreeNode $parentNode): WikiPageTreeNode } /** - * @return array + * @return WikiPageTreeNode[] */ public function getChildNodes(): array { diff --git a/src/Models/Wiki/WikiPage/WikiPageVersionRequestBuilder.php b/src/Models/Wiki/WikiPage/WikiPageVersionRequestBuilder.php index 8a8c3045..00968577 100644 --- a/src/Models/Wiki/WikiPage/WikiPageVersionRequestBuilder.php +++ b/src/Models/Wiki/WikiPage/WikiPageVersionRequestBuilder.php @@ -12,6 +12,9 @@ public function __construct(private $wikiCategory, private $pageIdentifier) { } + /** + * @return WikiPage[] + */ public function get(): array { try { diff --git a/src/Models/Wiki/WikiSearch/WikiSearchRequestBuilder.php b/src/Models/Wiki/WikiSearch/WikiSearchRequestBuilder.php index 30f7e8bc..29e6ecc4 100644 --- a/src/Models/Wiki/WikiSearch/WikiSearchRequestBuilder.php +++ b/src/Models/Wiki/WikiSearch/WikiSearchRequestBuilder.php @@ -24,6 +24,9 @@ public function search(string $query): self return $this; } + /** + * @return WikiSearchResult[] + */ public function get(): array { $options = [ diff --git a/tests/Integration/Requests/GroupMemberFieldsTest.php b/tests/Integration/Requests/GroupMemberFieldsTest.php index e38c5574..20f001dd 100644 --- a/tests/Integration/Requests/GroupMemberFieldsTest.php +++ b/tests/Integration/Requests/GroupMemberFieldsTest.php @@ -2,6 +2,7 @@ namespace integration\Requests; +use CTApi\Models\Groups\GroupMember\GroupMemberField; use CTApi\Models\Groups\GroupMember\GroupMemberFieldContainer; use CTApi\Models\Groups\GroupMember\GroupMemberFieldsRequest; use CTApi\Test\Integration\IntegrationTestCase; diff --git a/tests/Integration/Requests/SongRequestTest.php b/tests/Integration/Requests/SongRequestTest.php index c8b61fcd..f59fdc0b 100644 --- a/tests/Integration/Requests/SongRequestTest.php +++ b/tests/Integration/Requests/SongRequestTest.php @@ -43,12 +43,12 @@ public function testGetOneSong(): void $lastSong = end($allSongs); //Retrieve from Find - $oneSong = SongRequest::find($lastSong->getId()); + $oneSong = SongRequest::find($lastSong->getIdAsInteger()); $this->assertNotNull($oneSong); $this->assertEquals($lastSong->getName(), $oneSong->getName()); //Retrieve from FindOrFail - $oneSong = SongRequest::findOrFail($lastSong->getId()); + $oneSong = SongRequest::findOrFail($lastSong->getIdAsInteger()); $this->assertEquals($lastSong->getName(), $oneSong->getName()); } diff --git a/tests/Integration/Requests/WikiRequestTest.php b/tests/Integration/Requests/WikiRequestTest.php index 94a9835f..b67e0c3b 100644 --- a/tests/Integration/Requests/WikiRequestTest.php +++ b/tests/Integration/Requests/WikiRequestTest.php @@ -152,7 +152,7 @@ public function testRequestWikiPageVersion(): void if (sizeof($versions) > 0) { $version = $versions[0]; - $versionRequested = $page->requestVersion($version->getVersion()); + $versionRequested = $page->requestVersion((int) $version->getVersion()); $this->assertNotNull($versionRequested); $this->assertEquals($version->getIdentifier(), $versionRequested->getIdentifier()); diff --git a/tests/Unit/Docs/GroupMeetingRequestTest.php b/tests/Unit/Docs/GroupMeetingRequestTest.php index e8f539d2..aa385c5f 100644 --- a/tests/Unit/Docs/GroupMeetingRequestTest.php +++ b/tests/Unit/Docs/GroupMeetingRequestTest.php @@ -39,9 +39,9 @@ public function testRetrieveGroupRequest() $this->assertEquals(5, $meeting->getNumGuests()); $this->assertEquals("Hello World", $meeting->getComment()); - $this->assertEquals(2, $meeting?->getStatistics()->getPresent()); - $this->assertEquals(1, $meeting?->getStatistics()->getAbsent()); - $this->assertEquals(0, $meeting?->getStatistics()->getUnsure()); + $this->assertEquals(2, $meeting->getStatistics()->getPresent()); + $this->assertEquals(1, $meeting->getStatistics()->getAbsent()); + $this->assertEquals(0, $meeting->getStatistics()->getUnsure()); } public function testRetrieveGroupMemberRequest()