File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed
Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff 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 ();
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments