From 10e5602f8d8c964bf48bb5c369da8e131c0ab5ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Fri, 5 Apr 2024 02:48:44 +0000 Subject: [PATCH] Fix typos --- CHANGELOG.md | 4 ++-- src/commands/outdated/OutdatedCommand.php | 6 +++--- src/services/resolver/GithubAliasResolver.php | 4 ++-- src/shared/environment/Environment.php | 2 +- src/shared/repository/GithubRepository.php | 2 +- tests/regression/PurgeCommandTest.php | 2 +- tests/unit/services/migration/HomePhiveXmlMigrationTest.php | 2 +- tests/unit/shared/UrlTest.php | 2 +- tests/unit/shared/http/CurlHttpClientTest.php | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 936f7068..3758623f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -152,7 +152,7 @@ That means strings like `v1.2.0` or `1.2` will turn into `1.2.0`. Please note: Version 0.13.x is the last to support PHP 7.1. Users are encouraged to upgrade to PHP 7.2 or later. ### Fixed -* Github blocks HEAD requests to their API Rate Limit endpoint, use GET +* GitHub blocks HEAD requests to their API Rate Limit endpoint, use GET ## [0.13.4] - 2020-09-18 @@ -222,7 +222,7 @@ Please note: Version 0.13.x is the last to support PHP 7.1. Uses are encouraged ### Changed * Added `keys.openpgp.org` to keyserver list -* Changed order of keyservers: new verifing keyserver first, use fedora & ubuntu second, sks as last resort +* Changed order of keyservers: new verifying keyserver first, use fedora & ubuntu second, sks as last resort (This will be less of an issue once [#158](https://github.com/phar-io/phive/issues/158) is implemented.) ## [0.12.2] - 2019-06-02 diff --git a/src/commands/outdated/OutdatedCommand.php b/src/commands/outdated/OutdatedCommand.php index 80cd6938..f38f2777 100644 --- a/src/commands/outdated/OutdatedCommand.php +++ b/src/commands/outdated/OutdatedCommand.php @@ -171,8 +171,8 @@ private function renderXmlOutput(array $outdated): string { } private function writeToFile(string $output): void { - $destionation = $this->outdatedConfig->outputFilename(); - $destionation->getDirectory()->ensureExists(); - file_put_contents($destionation->asString(), $output . "\n"); + $destination = $this->outdatedConfig->outputFilename(); + $destination->getDirectory()->ensureExists(); + file_put_contents($destination->asString(), $output . "\n"); } } diff --git a/src/services/resolver/GithubAliasResolver.php b/src/services/resolver/GithubAliasResolver.php index de24b36f..e920804e 100644 --- a/src/services/resolver/GithubAliasResolver.php +++ b/src/services/resolver/GithubAliasResolver.php @@ -50,7 +50,7 @@ public function resolve(RequestedPhar $requestedPhar): SourceRepository { return $this->tryNext($requestedPhar); } catch (GithubAliasResolverException $e) { $this->output->writeWarning( - sprintf('Github API Rate Limit exceeded - cannot resolve "%s"', $name) + sprintf('GitHub API Rate Limit exceeded - cannot resolve "%s"', $name) ); return $this->tryNext($requestedPhar); @@ -87,7 +87,7 @@ private function ensureWithinRateLimit(): void { $this->initRateLimit(); if ($this->rateLimit->getRemaining() === 0) { - throw new GithubAliasResolverException('Github API over rate limit'); + throw new GithubAliasResolverException('GitHub API over rate limit'); } } diff --git a/src/shared/environment/Environment.php b/src/shared/environment/Environment.php index 0e4dbe59..60971a93 100644 --- a/src/shared/environment/Environment.php +++ b/src/shared/environment/Environment.php @@ -153,7 +153,7 @@ private function disableXDebug(): void { ini_set('xdebug.max_nesting_level', '8192'); ini_set('xdebug.show_exception_trace', 'off'); - // since `xdebug_disable` got removed in Xdebug 3 we have to check for its existance + // since `xdebug_disable` got removed in Xdebug 3 we have to check for its existence if (function_exists('xdebug_disable')) { xdebug_disable(); } diff --git a/src/shared/repository/GithubRepository.php b/src/shared/repository/GithubRepository.php index 54671160..9be42ab3 100644 --- a/src/shared/repository/GithubRepository.php +++ b/src/shared/repository/GithubRepository.php @@ -71,7 +71,7 @@ public function getReleasesByRequestedPhar(RequestedPhar $requestedPhar): Releas } $releases->add( - // Github doesn't publish any hashes for the files :-( + // GitHub doesn't publish any hashes for the files :-( new SupportedRelease($name, $version, $pharUrl, $signatureUrl) ); } diff --git a/tests/regression/PurgeCommandTest.php b/tests/regression/PurgeCommandTest.php index 694aa3a8..b82464e8 100644 --- a/tests/regression/PurgeCommandTest.php +++ b/tests/regression/PurgeCommandTest.php @@ -11,7 +11,7 @@ namespace PharIo\Phive\RegressionTests; class PurgeCommandTest extends RegressionTestCase { - public function testDeletesPurgablePhar(): void { + public function testDeletesPurgeablePhar(): void { $this->addPharToRegistry('phpunit', '5.3.4', 'phpunit-5.3.4.phar'); $this->assertTrue( diff --git a/tests/unit/services/migration/HomePhiveXmlMigrationTest.php b/tests/unit/services/migration/HomePhiveXmlMigrationTest.php index e3ce300a..5d5ed132 100644 --- a/tests/unit/services/migration/HomePhiveXmlMigrationTest.php +++ b/tests/unit/services/migration/HomePhiveXmlMigrationTest.php @@ -53,7 +53,7 @@ public function testNotInErrorWithMissingNew(): void { /** * No phive.xml, and no global.xml. */ - public function testNotInErrorWithBothOldANdNewMissing(): void { + public function testNotInErrorWithBothOldAndNewMissing(): void { $migration = $this->createMigration([]); $this->assertFalse($migration->inError()); diff --git a/tests/unit/shared/UrlTest.php b/tests/unit/shared/UrlTest.php index a034522d..b186ed68 100644 --- a/tests/unit/shared/UrlTest.php +++ b/tests/unit/shared/UrlTest.php @@ -116,7 +116,7 @@ public function testReturnsRootPathForUrlsWithoutPath(): void { $this->assertEquals('/', (new Url('https://host'))->getPath()); } - public function testFilenameCanBeRetreived(): void { + public function testFilenameCanBeRetrieved(): void { $this->assertEquals( new Filename('some.phar'), (new Url('https://example.com/some.phar'))->getFilename() diff --git a/tests/unit/shared/http/CurlHttpClientTest.php b/tests/unit/shared/http/CurlHttpClientTest.php index 0221fb82..ff7d4935 100644 --- a/tests/unit/shared/http/CurlHttpClientTest.php +++ b/tests/unit/shared/http/CurlHttpClientTest.php @@ -124,7 +124,7 @@ public function testThrowsHttpExceptionIfHttpCodeIs0(): void { $this->curlHttpClient->get($url); } - public function testHandleProgressInfoPassesEpectedObjectToProgressHandler(): void { + public function testHandleProgressInfoPassesExpectedObjectToProgressHandler(): void { $this->curl->method('getHttpCode') ->willReturn(200);