Use more standardized phpcs

This commit is contained in:
Dane Everitt
2021-01-23 12:33:34 -08:00
parent a043071e3c
commit c449ca5155
493 changed files with 1116 additions and 3903 deletions

View File

@@ -44,11 +44,9 @@ class AuthenticateUserTest extends MiddlewareTestCase
/**
* Return an instance of the middleware for testing.
*
* @return \Pterodactyl\Http\Middleware\Api\Application\AuthenticateApplicationUser
*/
private function getMiddleware(): AuthenticateApplicationUser
{
return new AuthenticateApplicationUser;
return new AuthenticateApplicationUser();
}
}

View File

@@ -65,8 +65,6 @@ class AuthenticateIPAccessTest extends MiddlewareTestCase
/**
* Return an instance of the middleware to be used when testing.
*
* @return \Pterodactyl\Http\Middleware\Api\AuthenticateIPAccess
*/
private function getMiddleware(): AuthenticateIPAccess
{

View File

@@ -68,7 +68,7 @@ class AuthenticateKeyTest extends MiddlewareTestCase
$this->expectException(AccessDeniedHttpException::class);
$this->request->shouldReceive('bearerToken')->withNoArgs()->twice()->andReturn('abcd1234');
$this->repository->shouldReceive('findFirstWhere')->andThrow(new RecordNotFoundException);
$this->repository->shouldReceive('findFirstWhere')->andThrow(new RecordNotFoundException());
$this->getMiddleware()->handle($this->request, $this->getClosureAssertions(), ApiKey::TYPE_APPLICATION);
}
@@ -160,8 +160,6 @@ class AuthenticateKeyTest extends MiddlewareTestCase
/**
* Return an instance of the middleware with mocked dependencies for testing.
*
* @return \Pterodactyl\Http\Middleware\Api\AuthenticateKey
*/
private function getMiddleware(): AuthenticateKey
{

View File

@@ -70,7 +70,6 @@ class DaemonAuthenticateTest extends MiddlewareTestCase
* Test that passing in an invalid node daemon secret will result in a bad request
* exception being returned.
*
* @param string $token
* @dataProvider badTokenDataProvider
*/
public function testResponseShouldFailIfTokenFormatIsIncorrect(string $token)
@@ -159,8 +158,6 @@ class DaemonAuthenticateTest extends MiddlewareTestCase
/**
* Return an instance of the middleware using mocked dependencies.
*
* @return \Pterodactyl\Http\Middleware\Api\Daemon\DaemonAuthenticate
*/
private function getMiddleware(): DaemonAuthenticate
{

View File

@@ -36,8 +36,6 @@ class SetSessionDriverTest extends MiddlewareTestCase
/**
* Return an instance of the middleware with mocked dependencies for testing.
*
* @return \Pterodactyl\Http\Middleware\Api\SetSessionDriver
*/
private function getMiddleware(): SetSessionDriver
{