mirror of
https://github.com/composer/composer
synced 2025-05-10 00:53:06 +00:00
Add void types where no return statement is present
This commit is contained in:
parent
32852304d0
commit
abdc6893a6
213 changed files with 1129 additions and 1130 deletions
|
@ -43,7 +43,7 @@ class AuthHelperTest extends TestCase
|
|||
$this->authHelper = new AuthHelper($this->io, $this->config);
|
||||
}
|
||||
|
||||
public function testAddAuthenticationHeaderWithoutAuthCredentials()
|
||||
public function testAddAuthenticationHeaderWithoutAuthCredentials(): void
|
||||
{
|
||||
$headers = array(
|
||||
'Accept-Encoding: gzip',
|
||||
|
@ -63,7 +63,7 @@ class AuthHelperTest extends TestCase
|
|||
);
|
||||
}
|
||||
|
||||
public function testAddAuthenticationHeaderWithBearerPassword()
|
||||
public function testAddAuthenticationHeaderWithBearerPassword(): void
|
||||
{
|
||||
$headers = array(
|
||||
'Accept-Encoding: gzip',
|
||||
|
@ -86,7 +86,7 @@ class AuthHelperTest extends TestCase
|
|||
);
|
||||
}
|
||||
|
||||
public function testAddAuthenticationHeaderWithGithubToken()
|
||||
public function testAddAuthenticationHeaderWithGithubToken(): void
|
||||
{
|
||||
$headers = array(
|
||||
'Accept-Encoding: gzip',
|
||||
|
@ -113,7 +113,7 @@ class AuthHelperTest extends TestCase
|
|||
);
|
||||
}
|
||||
|
||||
public function testAddAuthenticationHeaderWithGitlabOathToken()
|
||||
public function testAddAuthenticationHeaderWithGitlabOathToken(): void
|
||||
{
|
||||
$headers = array(
|
||||
'Accept-Encoding: gzip',
|
||||
|
@ -158,7 +158,7 @@ class AuthHelperTest extends TestCase
|
|||
*
|
||||
* @param string $password
|
||||
*/
|
||||
public function testAddAuthenticationHeaderWithGitlabPrivateToken($password)
|
||||
public function testAddAuthenticationHeaderWithGitlabPrivateToken($password): void
|
||||
{
|
||||
$headers = array(
|
||||
'Accept-Encoding: gzip',
|
||||
|
@ -190,7 +190,7 @@ class AuthHelperTest extends TestCase
|
|||
);
|
||||
}
|
||||
|
||||
public function testAddAuthenticationHeaderWithBitbucketOathToken()
|
||||
public function testAddAuthenticationHeaderWithBitbucketOathToken(): void
|
||||
{
|
||||
$headers = array(
|
||||
'Accept-Encoding: gzip',
|
||||
|
@ -235,7 +235,7 @@ class AuthHelperTest extends TestCase
|
|||
*
|
||||
* @param string $url
|
||||
*/
|
||||
public function testAddAuthenticationHeaderWithBitbucketPublicUrl($url)
|
||||
public function testAddAuthenticationHeaderWithBitbucketPublicUrl($url): void
|
||||
{
|
||||
$headers = array(
|
||||
'Accept-Encoding: gzip',
|
||||
|
@ -299,7 +299,7 @@ class AuthHelperTest extends TestCase
|
|||
*
|
||||
* @phpstan-param array{username: string|null, password: string|null} $auth
|
||||
*/
|
||||
public function testAddAuthenticationHeaderWithBasicHttpAuthentication($url, $origin, $auth)
|
||||
public function testAddAuthenticationHeaderWithBasicHttpAuthentication($url, $origin, $auth): void
|
||||
{
|
||||
$headers = array(
|
||||
'Accept-Encoding: gzip',
|
||||
|
@ -337,12 +337,12 @@ class AuthHelperTest extends TestCase
|
|||
*
|
||||
* @param string $url
|
||||
*/
|
||||
public function testIsPublicBitBucketDownloadWithBitbucketPublicUrl($url)
|
||||
public function testIsPublicBitBucketDownloadWithBitbucketPublicUrl($url): void
|
||||
{
|
||||
$this->assertTrue($this->authHelper->isPublicBitBucketDownload($url));
|
||||
}
|
||||
|
||||
public function testIsPublicBitBucketDownloadWithNonBitbucketPublicUrl()
|
||||
public function testIsPublicBitBucketDownloadWithNonBitbucketPublicUrl(): void
|
||||
{
|
||||
$this->assertFalse(
|
||||
$this->authHelper->isPublicBitBucketDownload(
|
||||
|
@ -351,7 +351,7 @@ class AuthHelperTest extends TestCase
|
|||
);
|
||||
}
|
||||
|
||||
public function testStoreAuthAutomatically()
|
||||
public function testStoreAuthAutomatically(): void
|
||||
{
|
||||
$origin = 'github.com';
|
||||
$storeAuth = true;
|
||||
|
@ -383,7 +383,7 @@ class AuthHelperTest extends TestCase
|
|||
$this->authHelper->storeAuth($origin, $storeAuth);
|
||||
}
|
||||
|
||||
public function testStoreAuthWithPromptYesAnswer()
|
||||
public function testStoreAuthWithPromptYesAnswer(): void
|
||||
{
|
||||
$origin = 'github.com';
|
||||
$storeAuth = 'prompt';
|
||||
|
@ -435,7 +435,7 @@ class AuthHelperTest extends TestCase
|
|||
$this->authHelper->storeAuth($origin, $storeAuth);
|
||||
}
|
||||
|
||||
public function testStoreAuthWithPromptNoAnswer()
|
||||
public function testStoreAuthWithPromptNoAnswer(): void
|
||||
{
|
||||
$origin = 'github.com';
|
||||
$storeAuth = 'prompt';
|
||||
|
@ -473,7 +473,7 @@ class AuthHelperTest extends TestCase
|
|||
$this->authHelper->storeAuth($origin, $storeAuth);
|
||||
}
|
||||
|
||||
public function testStoreAuthWithPromptInvalidAnswer()
|
||||
public function testStoreAuthWithPromptInvalidAnswer(): void
|
||||
{
|
||||
self::expectException('RuntimeException');
|
||||
|
||||
|
@ -521,7 +521,7 @@ class AuthHelperTest extends TestCase
|
|||
*
|
||||
* @phpstan-param array{username: string|null, password: string|null} $auth
|
||||
*/
|
||||
private function expectsAuthentication($origin, $auth)
|
||||
private function expectsAuthentication($origin, $auth): void
|
||||
{
|
||||
$this->io->expects($this->once())
|
||||
->method('hasAuthentication')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue