Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/Service/CoreService.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ public function __construct(
* @param string $account_bauth_id account username
* @param string $account_bauth_secret account secret
*
* @return object
* @return (mixed|string)[]|null
*
* @psalm-return array{location_host: mixed|string, location_path: '.well-known/caldav'|mixed,...}|null
*/
public function locateAccount(array $configuration): ?array {
$dnsTarget = null;
Expand Down Expand Up @@ -362,7 +364,7 @@ public function localCollectionsFetch(string $uid, int $sid): array {
* @param array $cc contacts collection(s) correlations
* @param array $ec events collection(s) correlations
*
* @return array of collection correlation(s) and attributes
* @return void of collection correlation(s) and attributes
*/
public function localCollectionsDeposit(string $uid, int $sid, array $cc, array $ec): void {

Expand Down Expand Up @@ -487,8 +489,6 @@ public function localCollectionsDeposit(string $uid, int $sid, array $cc, array
* @param string $uid nextcloud user id
* @param string $subject notification type
* @param array $params notification parameters to pass
*
* @return array of collection correlation(s) and attributes
*/
public function publishNotice(string $uid, string $subject, array $params): void {
// construct notification object
Expand Down
2 changes: 1 addition & 1 deletion lib/Service/Local/LocalContactsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function collectionFetch(int $id): ?Collection {
return $co instanceof CollectionEntity ? $this->toCollectionModel($co) : null;
}

public function collectionDelta(int $id): string {
public function collectionDelta(int $id): int|float|string {
return $this->_Store->chronicleApex($id, true);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Service/Local/LocalEventsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function collectionFetch(int $id): ?Collection {
return $co instanceof CollectionEntity ? $this->toCollectionModel($co) : null;
}

public function collectionDelta(int $id): string {
public function collectionDelta(int $id): int|float|string {
return $this->_Store->chronicleApex($id, true);
}

Expand Down
8 changes: 6 additions & 2 deletions lib/Service/Remote/RemoteClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,9 @@ public function multiGet(string $collectionPath, array $hrefs, string $reportTyp
}

/**
* @return array{etag: string|null, statusCode: int, location: string|null, lastModified: string|null, response: IResponse}
* @return (int|null|string)[]
*
* @psalm-return array{etag: null|string, status: int, location: null|string, lastModified: null|string}
*/
public function create(string $path, string $payload, string $contentType): array {
$url = $this->constructUrl($path);
Expand All @@ -296,7 +298,9 @@ public function create(string $path, string $payload, string $contentType): arra
}

/**
* @return array{etag: string|null, statusCode: int, location: string|null, lastModified: string|null, response: IResponse}
* @return (int|null|string)[]
*
* @psalm-return array{etag: null|string, status: int, location: null|string, lastModified: null|string}
*/
public function update(string $path, string $payload, string $contentType, ?string $etag = null): array {
$url = $this->constructUrl($path);
Expand Down
4 changes: 3 additions & 1 deletion lib/Service/Remote/RemoteContactsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ public function initialize(RemoteClient $dataStore) {
/**
* list of collections in remote storage
*
* @return array<string,Collection>
* @return Collection[]
*
* @psalm-return list<OCA\DAVC\Models\Contacts\Collection>
*/
public function collectionList(string $granularity = 'basic'): array {
// transceive
Expand Down
4 changes: 3 additions & 1 deletion lib/Service/Remote/RemoteEventsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ public function initialize(RemoteClient $dataStore) {
/**
* list of collections in remote storage
*
* @return array<string,Collection>
* @return Collection[]
*
* @psalm-return list<OCA\DAVC\Models\Calendars\Collection>
*/
public function collectionList(string $granularity = 'basic'): array {
// transceive
Expand Down
15 changes: 5 additions & 10 deletions lib/Store/Common/Range/IRangeTally.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,27 @@
interface IRangeTally extends IRange {

/**
*
* @since 1.0.0
* range anchor type (relative or absolute)
*/
public function anchor(): RangeAnchorType;

/**
*
* @since 1.0.0
* position within the range
*/
public function getPosition(): string|int;

/**
*
* @since 1.0.0
* set the position within the range
*/
public function setPosition(string|int $value): void;

/**
*
* @since 1.0.0
* get count within the range
*/
public function getCount(): int;

/**
*
* @since 1.0.0
* set the count within the range
*/
public function setCount(int $value): void;

Expand Down
20 changes: 0 additions & 20 deletions lib/Store/Common/Range/RangeDate.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,46 +30,26 @@ public function __construct(

}

/**
*
* @since 1.0.0
*/
#[\Override]
public function type(): string {
return 'date';
}

/**
*
* @since 1.0.0
*/
#[\Override]
public function getStart(): DateTimeInterface {
return $this->start;
}

/**
*
* @since 1.0.0
*/
#[\Override]
public function setStart(DateTimeInterface $value): void {
$this->start = $value;
}

/**
*
* @since 1.0.0
*/
#[\Override]
public function getEnd(): DateTimeInterface {
return $this->end;
}

/**
*
* @since 1.0.0
*/
#[\Override]
public function setEnd(DateTimeInterface $value): void {
$this->end = $value;
Expand Down
24 changes: 0 additions & 24 deletions lib/Store/Common/Range/RangeTallyAbsolute.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,55 +17,31 @@ public function __construct(
) {
}

/**
*
* @since 1.0.0
*/
#[\Override]
public function type(): string {
return 'tally';
}

/**
*
* @since 1.0.0
*/
#[\Override]
public function anchor(): RangeAnchorType {
return RangeAnchorType::ABSOLUTE;
}

/**
*
* @since 1.0.0
*/
#[\Override]
public function getPosition(): string|int {
return $this->position;
}

/**
*
* @since 1.0.0
*/
#[\Override]
public function setPosition(string|int $value): void {
$this->position = $value;
}

/**
*
* @since 1.0.0
*/
#[\Override]
public function getCount(): int {
return $this->count;
}

/**
*
* @since 1.0.0
*/
#[\Override]
public function setCount(int $value): void {
$this->count = $value;
Expand Down
24 changes: 0 additions & 24 deletions lib/Store/Common/Range/RangeTallyRelative.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,55 +17,31 @@ public function __construct(
) {
}

/**
*
* @since 1.0.0
*/
#[\Override]
public function type(): string {
return 'tally';
}

/**
*
* @since 1.0.0
*/
#[\Override]
public function anchor(): RangeAnchorType {
return RangeAnchorType::RELATIVE;
}

/**
*
* @since 1.0.0
*/
#[\Override]
public function getPosition(): string|int {
return $this->position;
}

/**
*
* @since 1.0.0
*/
#[\Override]
public function setPosition(string|int $value): void {
$this->position = $value;
}

/**
*
* @since 1.0.0
*/
#[\Override]
public function getCount(): int {
return $this->count;
}

/**
*
* @since 1.0.0
*/
#[\Override]
public function setCount(int $value): void {
$this->count = $value;
Expand Down
Loading