mirror of
https://github.com/appwrite/appwrite
synced 2026-05-22 16:38:32 +00:00
Improve PHP types for extensability
This commit is contained in:
parent
9bda83104d
commit
59f178d634
1 changed files with 1 additions and 4 deletions
|
|
@ -95,15 +95,12 @@ class Key
|
|||
* Decode the given secret key into a Key object, containing the project ID, type, role, scopes, and name.
|
||||
* Can be a stored API key or a dynamic key (JWT).
|
||||
*
|
||||
* @param Document $project
|
||||
* @param string $key
|
||||
* @return Key
|
||||
* @throws Exception
|
||||
*/
|
||||
public static function decode(
|
||||
Document $project,
|
||||
string $key
|
||||
): Key {
|
||||
): static {
|
||||
if (\str_contains($key, '_')) {
|
||||
[$type, $secret] = \explode('_', $key, 2);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue