[TOOLS] Add explicit return types to fix deprecation warnings raised by PHPUnit

This commit is contained in:
2022-03-06 23:50:40 +00:00
committed by Diogo Peralta Cordeiro
parent 372cf91fbc
commit 46de2d47e9
9 changed files with 13 additions and 11 deletions

View File

@@ -35,6 +35,7 @@ namespace Plugin\OAuth2\Repository;
use App\Core\DB\DB;
use App\Util\Exception\NotFoundException;
use League\OAuth2\Server\Entities\ClientEntityInterface;
use League\OAuth2\Server\Repositories\ClientRepositoryInterface;
use Plugin\OAuth2\Entity;
@@ -63,7 +64,7 @@ class Client implements ClientRepositoryInterface
* @throws \App\Util\Exception\DuplicateFoundException
* @throws NotFoundException
*/
public function getClientEntity($clientIdentifier)
public function getClientEntity($clientIdentifier): ?ClientEntityInterface
{
return DB::findOneBy(Entity\Client::class, ['id' => $clientIdentifier]);
}