Skip to content

Commit 2b87c72

Browse files
committed
cleanup and pipelines fix
Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
1 parent 3401868 commit 2b87c72

14 files changed

Lines changed: 2612 additions & 500 deletions

File tree

REUSE.toml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ precedence = "aggregate"
2929
SPDX-FileCopyrightText = "2025 Nextcloud GmbH and Nextcloud contributors"
3030
SPDX-License-Identifier = "AGPL-3.0-or-later"
3131

32-
[[annotations]]
33-
path = ["vendor-bin/rector/composer.json", "vendor-bin/rector/composer.lock"]
34-
precedence = "aggregate"
35-
SPDX-FileCopyrightText = "2025 Nextcloud GmbH and Nextcloud contributors"
36-
SPDX-License-Identifier = "AGPL-3.0-or-later"
37-
3832
[[annotations]]
3933
path = ["img/app-dark.svg", "img/app.svg", "img/view.svg", "img/view-dark.svg", "img/material/*.svg"]
4034
precedence = "aggregate"

lib/Activity/ChangeSet.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ public function __construct(
2424
}
2525
}
2626

27-
public function setBefore(Entity $before) {
27+
public function setBefore($before) {
2828
$this->before = clone $before;
2929
}
3030

31-
public function setAfter(Entity $after) {
31+
public function setAfter($after) {
3232
$this->after = clone $after;
3333
}
3434

lib/Analytics/AnalyticsDatasource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ private function formatBooleanValue(mixed $value): string {
338338
return '';
339339
}
340340

341-
private function formatTextValue(Column $column, string $value): string {
341+
private function formatTextValue(Column $column, mixed $value): string {
342342
if ($value === null || $value === '') {
343343
return '';
344344
}

lib/Controller/PublicRowOCSController.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ public function __construct(
5454
* @param string $token The share token
5555
* @param int|null $limit Optional: maximum number of results, capped at 500
5656
* @param int|null $offset Optional: the offset for this operation
57+
* @param string|null $filter Optional: a JSON encoded filter parameter
58+
* @param string|null $sort Optional: a JSON encoded sort parameter
59+
* @param string|null $search Optional: a search string
60+
* @param string|null $rowIds Optional: a JSON encoded list of row IDs
5761
* @return DataResponse<Http::STATUS_OK, list<TablesPublicRow>, array{}>|DataResponse<Http::STATUS_FORBIDDEN|Http::STATUS_BAD_REQUEST|Http::STATUS_NOT_FOUND|Http::STATUS_INTERNAL_SERVER_ERROR, array{message: string}, array{}>
5862
*
5963
* 200: Rows are returned
@@ -164,7 +168,7 @@ public function countRows(string $token, ?string $filter = null, ?string $sort =
164168
* @param ?string $sort Optional: a JSON encoded sort parameter
165169
* @param ?string $search Optional: a search string
166170
* @param ?string $rowIds Optional: a JSON encoded list of row IDs to export
167-
* @return DataDownloadResponse<Http::STATUS_OK, array{headers: array<string, string>}>|DataResponse<Http::STATUS_FORBIDDEN|Http::STATUS_BAD_REQUEST|Http::STATUS_NOT_FOUND|Http::STATUS_INTERNAL_SERVER_ERROR, array{message: string}, array{}>
171+
* @return DataDownloadResponse<Http::STATUS_OK, 'text/csv', array{}>|DataResponse<Http::STATUS_FORBIDDEN|Http::STATUS_BAD_REQUEST|Http::STATUS_NOT_FOUND|Http::STATUS_INTERNAL_SERVER_ERROR, array{message: string}, array{}>
168172
*
169173
* 200: CSV file is returned
170174
* 400: Invalid request parameters

lib/Controller/RowOCSController.php

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ public function createRow(string $nodeCollection, int $nodeId, mixed $data): Dat
125125
* @psalm-param ?int<0,max> $offset Offset of the rows to be returned (optional)
126126
* @param ?string $filter JSON encoded list of filter groups. Definitions within a group are AND-connected, groups are OR-connected, e.g. `[[{"columnId":1,"operator":"contains","value":"foo"}]]` (optional)
127127
* @param ?string $sort JSON encoded list of sort rules, e.g. `[{"columnId":1,"mode":"ASC"}]` (optional)
128+
* @param ?string $search Search string (optional)
129+
* @param ?string $rowIds JSON encoded list of row IDs (optional)
128130
* @return DataResponse<Http::STATUS_OK, list<TablesRow>, array{}>|DataResponse<Http::STATUS_FORBIDDEN|Http::STATUS_BAD_REQUEST|Http::STATUS_NOT_FOUND|Http::STATUS_INTERNAL_SERVER_ERROR, array{message: string}, array{}>
129131
*
130132
* 200: Rows returned
@@ -171,6 +173,22 @@ public function getRows(string $nodeCollection, int $nodeId, ?int $limit = null,
171173
}
172174
}
173175

176+
/**
177+
* [api v2] Count rows from a table or view
178+
*
179+
* @param 'tables'|'views' $nodeCollection Indicates whether to read from a table or a view
180+
* @psalm-param int<0,max> $nodeId The ID of the table or view
181+
* @param string|null $filter Optional: a JSON encoded filter parameter
182+
* @param string|null $sort Optional: a JSON encoded sort parameter
183+
* @param string|null $search Optional: a search string
184+
* @return DataResponse<Http::STATUS_OK, array{count: int}, array{}>|DataResponse<Http::STATUS_FORBIDDEN|Http::STATUS_BAD_REQUEST|Http::STATUS_NOT_FOUND|Http::STATUS_INTERNAL_SERVER_ERROR, array{message: string}, array{}>
185+
*
186+
* 200: Count is returned
187+
* 400: Invalid request parameters
188+
* 403: No permissions
189+
* 404: Not found
190+
* 500: Internal error
191+
*/
174192
#[NoAdminRequired]
175193
#[RequirePermission(permission: Application::PERMISSION_READ, typeParam: 'nodeCollection')]
176194
#[ApiRoute(
@@ -209,7 +227,7 @@ public function countRows(string $nodeCollection, int $nodeId, ?string $filter =
209227
* @param ?string $sort JSON encoded list of sort rules (optional)
210228
* @param ?string $search Search string (optional)
211229
* @param ?string $rowIds JSON encoded list of row IDs to export (optional)
212-
* @return DataDownloadResponse<Http::STATUS_OK, array{headers: array<string, string>}>|DataResponse<Http::STATUS_FORBIDDEN|Http::STATUS_BAD_REQUEST|Http::STATUS_NOT_FOUND|Http::STATUS_INTERNAL_SERVER_ERROR, array{message: string}, array{}>
230+
* @return DataDownloadResponse<Http::STATUS_OK, 'text/csv', array{}>|DataResponse<Http::STATUS_FORBIDDEN|Http::STATUS_BAD_REQUEST|Http::STATUS_NOT_FOUND|Http::STATUS_INTERNAL_SERVER_ERROR, array{message: string}, array{}>
213231
*
214232
* 200: CSV file is returned
215233
* 400: Invalid request parameters

lib/Service/ImportService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ private function upsertRow(Row $row, array $columnBusinesses): void {
701701
/**
702702
* @param null|string $value
703703
*/
704-
private function valueToDateTimeImmutable(string|null $value): ?DateTimeImmutable {
704+
private function valueToDateTimeImmutable(?string $value): ?DateTimeImmutable {
705705
if (
706706
$value === false
707707
|| $value === null

0 commit comments

Comments
 (0)