From 6f6820f629c26b09e7c2cff41feb23d2505d027e Mon Sep 17 00:00:00 2001 From: filecage Date: Sat, 16 Mar 2019 13:12:34 +0100 Subject: [PATCH] removes @var hints the @var hints make PHP stan fail together with PHPUnit 6.3 --- tests/Grant/AbstractGrantTest.php | 1 - tests/Grant/AuthCodeGrantTest.php | 1 - tests/Grant/PasswordGrantTest.php | 5 ----- tests/Grant/RefreshTokenGrantTest.php | 4 ---- 4 files changed, 11 deletions(-) diff --git a/tests/Grant/AbstractGrantTest.php b/tests/Grant/AbstractGrantTest.php index 1ed4a935..acb519bb 100644 --- a/tests/Grant/AbstractGrantTest.php +++ b/tests/Grant/AbstractGrantTest.php @@ -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()) diff --git a/tests/Grant/AuthCodeGrantTest.php b/tests/Grant/AuthCodeGrantTest.php index 7b81f9fb..0abea0c9 100644 --- a/tests/Grant/AuthCodeGrantTest.php +++ b/tests/Grant/AuthCodeGrantTest.php @@ -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); diff --git a/tests/Grant/PasswordGrantTest.php b/tests/Grant/PasswordGrantTest.php index 5f8b7e0c..5a9fad0b 100644 --- a/tests/Grant/PasswordGrantTest.php +++ b/tests/Grant/PasswordGrantTest.php @@ -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); diff --git a/tests/Grant/RefreshTokenGrantTest.php b/tests/Grant/RefreshTokenGrantTest.php index fc7a2c26..6743e270 100644 --- a/tests/Grant/RefreshTokenGrantTest.php +++ b/tests/Grant/RefreshTokenGrantTest.php @@ -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');