fix(activity): Remove unneeded exception (types are enforced)

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2024-04-17 15:30:43 +02:00
parent 9f4845e25b
commit 17744f8590
No known key found for this signature in database
GPG Key ID: 74434EFE0D2E2205
2 changed files with 0 additions and 5 deletions

View File

@ -334,12 +334,8 @@ class Manager implements IManager {
* Set the user we need to use
*
* @param string|null $currentUserId
* @throws \UnexpectedValueException If the user is invalid
*/
public function setCurrentUserId(?string $currentUserId = null): void {
if (!is_string($currentUserId) && $currentUserId !== null) {
throw new \UnexpectedValueException('The given current user is invalid');
}
$this->currentUserId = $currentUserId;
}

View File

@ -165,7 +165,6 @@ interface IManager {
* Set the user we need to use
*
* @param string|null $currentUserId
* @throws \UnexpectedValueException If the user is invalid
* @since 9.0.1
*/
public function setCurrentUserId(?string $currentUserId = null): void;