mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-08 21:52:24 +05:30
removes @var hints
the @var hints make PHP stan fail together with PHPUnit 6.3
This commit is contained in:
parent
0742d5150c
commit
6f6820f629
@ -349,7 +349,6 @@ class AbstractGrantTest extends TestCase
|
|||||||
|
|
||||||
public function testIssueNullRefreshToken()
|
public function testIssueNullRefreshToken()
|
||||||
{
|
{
|
||||||
/** @var RefreshTokenRepositoryInterface|MockObject $refreshTokenRepoMock */
|
|
||||||
$refreshTokenRepoMock = $this->getMockBuilder(RefreshTokenRepositoryInterface::class)->getMock();
|
$refreshTokenRepoMock = $this->getMockBuilder(RefreshTokenRepositoryInterface::class)->getMock();
|
||||||
$refreshTokenRepoMock
|
$refreshTokenRepoMock
|
||||||
->expects($this->once())
|
->expects($this->once())
|
||||||
|
@ -662,7 +662,6 @@ class AuthCodeGrantTest extends TestCase
|
|||||||
$accessTokenRepositoryMock->method('getNewToken')->willReturn(new AccessTokenEntity());
|
$accessTokenRepositoryMock->method('getNewToken')->willReturn(new AccessTokenEntity());
|
||||||
$accessTokenRepositoryMock->method('persistNewAccessToken')->willReturnSelf();
|
$accessTokenRepositoryMock->method('persistNewAccessToken')->willReturnSelf();
|
||||||
|
|
||||||
/** @var RefreshTokenRepositoryInterface|MockObject $refreshTokenRepositoryMock */
|
|
||||||
$refreshTokenRepositoryMock = $this->getMockBuilder(RefreshTokenRepositoryInterface::class)->getMock();
|
$refreshTokenRepositoryMock = $this->getMockBuilder(RefreshTokenRepositoryInterface::class)->getMock();
|
||||||
$refreshTokenRepositoryMock->method('persistNewRefreshToken')->willReturnSelf();
|
$refreshTokenRepositoryMock->method('persistNewRefreshToken')->willReturnSelf();
|
||||||
$refreshTokenRepositoryMock->method('getNewRefreshToken')->willReturn(null);
|
$refreshTokenRepositoryMock->method('getNewRefreshToken')->willReturn(null);
|
||||||
|
@ -81,28 +81,23 @@ class PasswordGrantTest extends TestCase
|
|||||||
|
|
||||||
public function testRespondToRequestNullRefreshToken()
|
public function testRespondToRequestNullRefreshToken()
|
||||||
{
|
{
|
||||||
/** @var ClientRepositoryInterface|MockObject $clientRepositoryMock */
|
|
||||||
$client = new ClientEntity();
|
$client = new ClientEntity();
|
||||||
$clientRepositoryMock = $this->getMockBuilder(ClientRepositoryInterface::class)->getMock();
|
$clientRepositoryMock = $this->getMockBuilder(ClientRepositoryInterface::class)->getMock();
|
||||||
$clientRepositoryMock->method('getClientEntity')->willReturn($client);
|
$clientRepositoryMock->method('getClientEntity')->willReturn($client);
|
||||||
|
|
||||||
/** @var AccessTokenRepositoryInterface|MockObject $accessTokenRepositoryMock */
|
|
||||||
$accessTokenRepositoryMock = $this->getMockBuilder(AccessTokenRepositoryInterface::class)->getMock();
|
$accessTokenRepositoryMock = $this->getMockBuilder(AccessTokenRepositoryInterface::class)->getMock();
|
||||||
$accessTokenRepositoryMock->method('getNewToken')->willReturn(new AccessTokenEntity());
|
$accessTokenRepositoryMock->method('getNewToken')->willReturn(new AccessTokenEntity());
|
||||||
$accessTokenRepositoryMock->method('persistNewAccessToken')->willReturnSelf();
|
$accessTokenRepositoryMock->method('persistNewAccessToken')->willReturnSelf();
|
||||||
|
|
||||||
/** @var UserRepositoryInterface|MockObject $userRepositoryMock */
|
|
||||||
$userRepositoryMock = $this->getMockBuilder(UserRepositoryInterface::class)->getMock();
|
$userRepositoryMock = $this->getMockBuilder(UserRepositoryInterface::class)->getMock();
|
||||||
$userEntity = new UserEntity();
|
$userEntity = new UserEntity();
|
||||||
$userRepositoryMock->method('getUserEntityByUserCredentials')->willReturn($userEntity);
|
$userRepositoryMock->method('getUserEntityByUserCredentials')->willReturn($userEntity);
|
||||||
|
|
||||||
/** @var ScopeRepositoryInterface|MockObject $scopeRepositoryMock */
|
|
||||||
$scope = new ScopeEntity();
|
$scope = new ScopeEntity();
|
||||||
$scopeRepositoryMock = $this->getMockBuilder(ScopeRepositoryInterface::class)->getMock();
|
$scopeRepositoryMock = $this->getMockBuilder(ScopeRepositoryInterface::class)->getMock();
|
||||||
$scopeRepositoryMock->method('getScopeEntityByIdentifier')->willReturn($scope);
|
$scopeRepositoryMock->method('getScopeEntityByIdentifier')->willReturn($scope);
|
||||||
$scopeRepositoryMock->method('finalizeScopes')->willReturnArgument(0);
|
$scopeRepositoryMock->method('finalizeScopes')->willReturnArgument(0);
|
||||||
|
|
||||||
/** @var RefreshTokenRepositoryInterface|MockObject $refreshTokenRepositoryMock */
|
|
||||||
$refreshTokenRepositoryMock = $this->getMockBuilder(RefreshTokenRepositoryInterface::class)->getMock();
|
$refreshTokenRepositoryMock = $this->getMockBuilder(RefreshTokenRepositoryInterface::class)->getMock();
|
||||||
$refreshTokenRepositoryMock->method('getNewRefreshToken')->willReturn(null);
|
$refreshTokenRepositoryMock->method('getNewRefreshToken')->willReturn(null);
|
||||||
|
|
||||||
|
@ -100,23 +100,19 @@ class RefreshTokenGrantTest extends TestCase
|
|||||||
$client = new ClientEntity();
|
$client = new ClientEntity();
|
||||||
$client->setIdentifier('foo');
|
$client->setIdentifier('foo');
|
||||||
|
|
||||||
/** @var ClientRepositoryInterface|MockObject $clientRepositoryMock */
|
|
||||||
$clientRepositoryMock = $this->getMockBuilder(ClientRepositoryInterface::class)->getMock();
|
$clientRepositoryMock = $this->getMockBuilder(ClientRepositoryInterface::class)->getMock();
|
||||||
$clientRepositoryMock->method('getClientEntity')->willReturn($client);
|
$clientRepositoryMock->method('getClientEntity')->willReturn($client);
|
||||||
|
|
||||||
$scopeEntity = new ScopeEntity();
|
$scopeEntity = new ScopeEntity();
|
||||||
$scopeEntity->setIdentifier('foo');
|
$scopeEntity->setIdentifier('foo');
|
||||||
|
|
||||||
/** @var ScopeRepositoryInterface|MockObject $scopeRepositoryMock */
|
|
||||||
$scopeRepositoryMock = $this->getMockBuilder(ScopeRepositoryInterface::class)->getMock();
|
$scopeRepositoryMock = $this->getMockBuilder(ScopeRepositoryInterface::class)->getMock();
|
||||||
$scopeRepositoryMock->method('getScopeEntityByIdentifier')->willReturn($scopeEntity);
|
$scopeRepositoryMock->method('getScopeEntityByIdentifier')->willReturn($scopeEntity);
|
||||||
|
|
||||||
/** @var AccessTokenRepositoryInterface|MockObject $accessTokenRepositoryMock */
|
|
||||||
$accessTokenRepositoryMock = $this->getMockBuilder(AccessTokenRepositoryInterface::class)->getMock();
|
$accessTokenRepositoryMock = $this->getMockBuilder(AccessTokenRepositoryInterface::class)->getMock();
|
||||||
$accessTokenRepositoryMock->method('getNewToken')->willReturn(new AccessTokenEntity());
|
$accessTokenRepositoryMock->method('getNewToken')->willReturn(new AccessTokenEntity());
|
||||||
$accessTokenRepositoryMock->expects($this->once())->method('persistNewAccessToken')->willReturnSelf();
|
$accessTokenRepositoryMock->expects($this->once())->method('persistNewAccessToken')->willReturnSelf();
|
||||||
|
|
||||||
/** @var RefreshTokenRepositoryInterface|MockObject $refreshTokenRepositoryMock */
|
|
||||||
$refreshTokenRepositoryMock = $this->getMockBuilder(RefreshTokenRepositoryInterface::class)->getMock();
|
$refreshTokenRepositoryMock = $this->getMockBuilder(RefreshTokenRepositoryInterface::class)->getMock();
|
||||||
$refreshTokenRepositoryMock->method('getNewRefreshToken')->willReturn(null);
|
$refreshTokenRepositoryMock->method('getNewRefreshToken')->willReturn(null);
|
||||||
$refreshTokenRepositoryMock->expects($this->never())->method('persistNewRefreshToken');
|
$refreshTokenRepositoryMock->expects($this->never())->method('persistNewRefreshToken');
|
||||||
|
Loading…
Reference in New Issue
Block a user