Improve PHP types for extensability

This commit is contained in:
Matej Bačo 2025-12-18 13:37:50 +01:00
parent 9bda83104d
commit 59f178d634

View file

@ -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 {