Skip to content

Commit a9f3534

Browse files
Merge pull request #57655 from nextcloud/fix/noid/typing-activity-manager
fix(activity): allow string types for snowflake IDs
2 parents 677d425 + f9a159e commit a9f3534

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/private/Activity/Manager.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Manager implements IManager {
3232
/** @var string */
3333
protected $formattingObjectType;
3434

35-
/** @var int */
35+
/** @var int|string */
3636
protected $formattingObjectId;
3737

3838
/** @var bool */
@@ -297,9 +297,9 @@ public function getSettingById(string $id): ActivitySettings {
297297

298298
/**
299299
* @param string $type
300-
* @param int $id
300+
* @param int|numeric-string $id
301301
*/
302-
public function setFormattingObject(string $type, int $id): void {
302+
public function setFormattingObject(string $type, int|string $id): void {
303303
$this->formattingObjectType = $type;
304304
$this->formattingObjectId = $id;
305305
}

lib/public/Activity/IManager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,10 @@ public function getSettingById(string $id): ActivitySettings;
132132

133133
/**
134134
* @param string $type
135-
* @param int $id
135+
* @param int|numeric-string $id
136136
* @since 8.2.0
137137
*/
138-
public function setFormattingObject(string $type, int $id): void;
138+
public function setFormattingObject(string $type, int|string $id): void;
139139

140140
/**
141141
* @return bool

0 commit comments

Comments
 (0)