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