Improved public API in ApiKey entity, reducing anemic model

This commit is contained in:
Alejandro Celaya
2018-10-28 15:24:41 +01:00
parent e046eddda9
commit 877b098b09
6 changed files with 23 additions and 46 deletions

View File

@@ -18,6 +18,9 @@ interface ApiKeyServiceInterface
*/
public function disable(string $key): ApiKey;
/**
* @return ApiKey[]
*/
public function listKeys(bool $enabledOnly = false): array;
public function getByKey(string $key): ?ApiKey;