-
Notifications
You must be signed in to change notification settings - Fork 447
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13167 from nextcloud/techdebt/noid/unify-room-pro…
…perty-updates fix(api): Properly typed room-property updates - Part 1
- Loading branch information
Showing
12 changed files
with
390 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
lib/Exceptions/RoomProperty/DefaultPermissionsException.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
/** | ||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
|
||
namespace OCA\Talk\Exceptions\RoomProperty; | ||
|
||
class DefaultPermissionsException extends \InvalidArgumentException { | ||
public const REASON_BREAKOUT_ROOM = 'breakout-room'; | ||
public const REASON_TYPE = 'type'; | ||
public const REASON_VALUE = 'value'; | ||
|
||
/** | ||
* @param self::REASON_* $reason | ||
*/ | ||
public function __construct( | ||
protected string $reason, | ||
) { | ||
parent::__construct($reason); | ||
} | ||
|
||
/** | ||
* @return self::REASON_* | ||
*/ | ||
public function getReason(): string { | ||
return $this->reason; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
/** | ||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
|
||
namespace OCA\Talk\Exceptions\RoomProperty; | ||
|
||
class LobbyException extends \InvalidArgumentException { | ||
public const REASON_BREAKOUT_ROOM = 'breakout-room'; | ||
public const REASON_OBJECT = 'object'; | ||
public const REASON_TYPE = 'type'; | ||
public const REASON_VALUE = 'value'; | ||
|
||
/** | ||
* @param self::REASON_* $reason | ||
*/ | ||
public function __construct( | ||
protected string $reason, | ||
) { | ||
parent::__construct($reason); | ||
} | ||
|
||
/** | ||
* @return self::REASON_* | ||
*/ | ||
public function getReason(): string { | ||
return $this->reason; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
/** | ||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
|
||
namespace OCA\Talk\Exceptions\RoomProperty; | ||
|
||
class NameException extends \InvalidArgumentException { | ||
public const REASON_TYPE = 'type'; | ||
public const REASON_VALUE = 'value'; | ||
|
||
/** | ||
* @param self::REASON_* $reason | ||
*/ | ||
public function __construct( | ||
protected string $reason, | ||
) { | ||
parent::__construct($reason); | ||
} | ||
|
||
/** | ||
* @return self::REASON_* | ||
*/ | ||
public function getReason(): string { | ||
return $this->reason; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
/** | ||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
|
||
namespace OCA\Talk\Exceptions\RoomProperty; | ||
|
||
class RecordingConsentException extends \InvalidArgumentException { | ||
public const REASON_BREAKOUT_ROOM = 'breakout-room'; | ||
public const REASON_CALL = 'call'; | ||
public const REASON_VALUE = 'value'; | ||
|
||
/** | ||
* @param self::REASON_* $reason | ||
*/ | ||
public function __construct( | ||
protected string $reason, | ||
) { | ||
parent::__construct($reason); | ||
} | ||
|
||
/** | ||
* @return self::REASON_* | ||
*/ | ||
public function getReason(): string { | ||
return $this->reason; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
/** | ||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
|
||
namespace OCA\Talk\Exceptions\RoomProperty; | ||
|
||
class SipConfigurationException extends \InvalidArgumentException { | ||
public const REASON_BREAKOUT_ROOM = 'breakout-room'; | ||
public const REASON_TOKEN = 'token'; | ||
public const REASON_TYPE = 'type'; | ||
public const REASON_VALUE = 'value'; | ||
|
||
/** | ||
* @param self::REASON_* $reason | ||
*/ | ||
public function __construct( | ||
protected string $reason, | ||
) { | ||
parent::__construct($reason); | ||
} | ||
|
||
/** | ||
* @return self::REASON_* | ||
*/ | ||
public function getReason(): string { | ||
return $this->reason; | ||
} | ||
} |
Oops, something went wrong.