diff options
Diffstat (limited to 'apps/oauth2')
-rw-r--r-- | apps/oauth2/lib/Db/AccessTokenMapper.php | 6 | ||||
-rw-r--r-- | apps/oauth2/lib/Db/ClientMapper.php | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/apps/oauth2/lib/Db/AccessTokenMapper.php b/apps/oauth2/lib/Db/AccessTokenMapper.php index 0b54d5c3da4..9702e2c58fd 100644 --- a/apps/oauth2/lib/Db/AccessTokenMapper.php +++ b/apps/oauth2/lib/Db/AccessTokenMapper.php @@ -44,10 +44,8 @@ class AccessTokenMapper extends Mapper { ->from($this->tableName) ->where($qb->expr()->eq('hashed_code', $qb->createNamedParameter(hash('sha512', $code)))); $result = $qb->execute(); - $rows = $result->fetchAll(); + $row = $result->fetchAll(); $result->closeCursor(); - return array_map(function ($row) { - return AccessToken::fromRow($row); - }, $rows); + return AccessToken::fromRow($row); } } diff --git a/apps/oauth2/lib/Db/ClientMapper.php b/apps/oauth2/lib/Db/ClientMapper.php index 8d1f26ce471..8531f6d007c 100644 --- a/apps/oauth2/lib/Db/ClientMapper.php +++ b/apps/oauth2/lib/Db/ClientMapper.php @@ -44,11 +44,9 @@ class ClientMapper extends Mapper { ->from($this->tableName) ->where($qb->expr()->eq('client_identifier', $qb->createNamedParameter($clientIdentifier))); $result = $qb->execute(); - $rows = $result->fetchAll(); + $row = $result->fetch(); $result->closeCursor(); - return array_map(function ($row) { - return Client::fromRow($row); - }, $rows); + return Client::fromRow($row); } /** |