From 08c04d2c9c91eed58f72fd276782fa198f3f4212 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Wed, 12 Oct 2022 08:45:10 -0600 Subject: [PATCH] Typofixes (#11096) * Fixing typo in private method name * Various comment-related typofixes --- src/Composer/Advisory/Auditor.php | 4 ++-- src/Composer/DependencyResolver/RuleSetGenerator.php | 2 +- .../Composer/Test/Fixtures/installer/github-issues-7051.test | 2 +- tests/Composer/Test/InstallerTest.php | 2 +- tests/Composer/Test/Util/ProcessExecutorTest.php | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Composer/Advisory/Auditor.php b/src/Composer/Advisory/Auditor.php index c72645a83..9ddb5b04b 100644 --- a/src/Composer/Advisory/Auditor.php +++ b/src/Composer/Advisory/Auditor.php @@ -98,7 +98,7 @@ class Auditor if (!($io instanceof ConsoleIO)) { throw new InvalidArgumentException('Cannot use table format with ' . get_class($io)); } - $this->outputAvisoriesTable($io, $advisories); + $this->outputAdvisoriesTable($io, $advisories); return; case self::FORMAT_PLAIN: @@ -118,7 +118,7 @@ class Auditor /** * @param array> $advisories */ - private function outputAvisoriesTable(ConsoleIO $io, array $advisories): void + private function outputAdvisoriesTable(ConsoleIO $io, array $advisories): void { foreach ($advisories as $packageAdvisories) { foreach ($packageAdvisories as $advisory) { diff --git a/src/Composer/DependencyResolver/RuleSetGenerator.php b/src/Composer/DependencyResolver/RuleSetGenerator.php index d415dd14e..69d119134 100644 --- a/src/Composer/DependencyResolver/RuleSetGenerator.php +++ b/src/Composer/DependencyResolver/RuleSetGenerator.php @@ -214,7 +214,7 @@ class RuleSetGenerator /** @var BasePackage $package */ foreach ($this->addedMap as $package) { foreach ($package->getConflicts() as $link) { - // even if conlict ends up being with an alias, there would be at least one actual package by this name + // even if conflict ends up being with an alias, there would be at least one actual package by this name if (!isset($this->addedPackagesByNames[$link->getTarget()])) { continue; } diff --git a/tests/Composer/Test/Fixtures/installer/github-issues-7051.test b/tests/Composer/Test/Fixtures/installer/github-issues-7051.test index bfa7c9440..190689db9 100644 --- a/tests/Composer/Test/Fixtures/installer/github-issues-7051.test +++ b/tests/Composer/Test/Fixtures/installer/github-issues-7051.test @@ -1,5 +1,5 @@ --TEST-- -Solver Bug Exception caused by analyze on mutli conflict rule reported in GitHub issue 7051 https://github.com/composer/composer/issues/7051 +Solver Bug Exception caused by analyze on multi conflict rule reported in GitHub issue 7051 https://github.com/composer/composer/issues/7051 --COMPOSER-- { "require": { diff --git a/tests/Composer/Test/InstallerTest.php b/tests/Composer/Test/InstallerTest.php index 6055fbef4..994bb993b 100644 --- a/tests/Composer/Test/InstallerTest.php +++ b/tests/Composer/Test/InstallerTest.php @@ -335,7 +335,7 @@ class InstallerTest extends TestCase ->method('write') ->will($this->returnCallback(static function ($hash, $options) use (&$actualLock): void { // need to do assertion outside of mock for nice phpunit output - // so store value temporarily in reference for later assetion + // so store value temporarily in reference for later assertion $actualLock = $hash; })); } elseif ($expectLock === false) { diff --git a/tests/Composer/Test/Util/ProcessExecutorTest.php b/tests/Composer/Test/Util/ProcessExecutorTest.php index 72a73652a..11372b44a 100644 --- a/tests/Composer/Test/Util/ProcessExecutorTest.php +++ b/tests/Composer/Test/Util/ProcessExecutorTest.php @@ -180,10 +180,10 @@ class ProcessExecutorTest extends TestCase // double-quotes must be backslash-escaped 'dq' => ['a"bc', 'a\^"bc', "'a\"bc'"], - // double-quotes must be backslash-escaped with preceeding backslashes doubled + // double-quotes must be backslash-escaped with preceding backslashes doubled 'dq-bslash' => ['a\\"bc', 'a\\\\\^"bc', "'a\\\"bc'"], - // backslashes not preceeding a double-quote are treated as literal + // backslashes not preceding a double-quote are treated as literal 'bslash' => ['ab\\\\c\\', 'ab\\\\c\\', "'ab\\\\c\\'"], // trailing backslashes must be doubled up when the argument is quoted