Skip to content

Commit 98b97e5

Browse files
committed
Fix TextProcessing for 32bit: Adjust signature: getTask(int) -> getTask(int|float)
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
1 parent af113dd commit 98b97e5

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

lib/private/TextProcessing/Db/TaskMapper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ public function __construct(
4545
}
4646

4747
/**
48-
* @param int $id
48+
* @param int|float $id
4949
* @return Task
5050
* @throws Exception
5151
* @throws DoesNotExistException
5252
* @throws MultipleObjectsReturnedException
5353
*/
54-
public function find(int $id): Task {
54+
public function find(int|float $id): Task {
5555
$qb = $this->db->getQueryBuilder();
5656
$qb->select(Task::$columns)
5757
->from($this->tableName)

lib/private/TextProcessing/Manager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,12 @@ public function scheduleTask(OCPTask $task): void {
162162
}
163163

164164
/**
165-
* @param int $id The id of the task
165+
* @param int|float $id The id of the task
166166
* @return OCPTask
167167
* @throws RuntimeException If the query failed
168168
* @throws NotFoundException If the task could not be found
169169
*/
170-
public function getTask(int $id): OCPTask {
170+
public function getTask(int|float $id): OCPTask {
171171
try {
172172
$taskEntity = $this->taskMapper->find($id);
173173
return $taskEntity->toPublicTask();

lib/public/TextProcessing/IManager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ public function runTask(Task $task): string;
6767
public function scheduleTask(Task $task) : void;
6868

6969
/**
70-
* @param int $id The id of the task
70+
* @param int|float $id The id of the task
7171
* @return Task
7272
* @throws RuntimeException If the query failed
7373
* @throws NotFoundException If the task could not be found
7474
* @since 27.1.0
7575
*/
76-
public function getTask(int $id): Task;
76+
public function getTask(int|float $id): Task;
7777
}

tests/lib/TextProcessing/TextProcessingTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ protected function setUp(): void {
138138
$this->taskMapper
139139
->expects($this->any())
140140
->method('find')
141-
->willReturnCallback(function (int $id) {
141+
->willReturnCallback(function (int|float $id) {
142142
if (!isset($this->tasksDb[$id])) {
143143
throw new DoesNotExistException('Could not find it');
144144
}

0 commit comments

Comments
 (0)