From 031f63e761a48fef9121e4b339422c831efb0ae2 Mon Sep 17 00:00:00 2001 From: Dave Long Date: Tue, 1 Aug 2023 11:07:26 +0100 Subject: [PATCH] Issue #3219513 by quietone, smustgrave, Vidushi Mehta, sourabhjain, rpayanm, longwave, xjm, dww, catch: Fix spelling for words used once, beginning with 'n' -> 'p', inclusive --- .../ContainerAwareEventDispatcher.php | 2 +- .../Drupal/Core/Database/StatementPrefetch.php | 2 +- .../EventSubscriber/ActiveLinkResponseFilter.php | 1 + .../Core/Installer/Form/SiteConfigureForm.php | 2 +- core/lib/Drupal/Core/Routing/RoutePreloader.php | 2 +- core/lib/Drupal/Core/Session/SessionManager.php | 2 +- core/misc/cspell/dictionary.txt | 15 --------------- .../language_config_override_test.info.yml | 2 +- core/modules/media/src/OEmbed/ResourceFetcher.php | 2 ++ core/modules/media/src/OEmbed/UrlResolver.php | 2 ++ .../migrate/EntityReferenceTranslationDeriver.php | 2 +- core/modules/syslog/src/Logger/SysLog.php | 2 ++ .../src/Controller/PagerTestController.php | 2 +- core/modules/update/update.compare.inc | 2 +- .../views/src/Plugin/views/style/Table.php | 2 +- .../KernelTests/Core/Config/ConfigCRUDTest.php | 2 +- .../KernelTests/Core/Database/TaggingTest.php | 2 +- .../Core/File/ReadOnlyStreamWrapperTest.php | 2 +- .../KernelTests/Core/File/ScanDirectoryTest.php | 2 +- .../ContainerAwareEventDispatcherTest.php | 2 +- .../Component/Gettext/PoStreamWriterTest.php | 2 +- core/tests/bootstrap.php | 4 ++-- 22 files changed, 25 insertions(+), 33 deletions(-) diff --git a/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php b/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php index 09a1d4e4122..41afec903e9 100644 --- a/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php +++ b/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php @@ -17,7 +17,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface; *
Faster instantiation of the event dispatcher service
*
* Instead of calling addSubscriberService once for each - * subscriber, a precompiled array of listener definitions is passed + * subscriber, a pre-compiled array of listener definitions is passed * directly to the constructor. This is faster by roughly an order of * magnitude. The listeners are collected and prepared using a compiler * pass. diff --git a/core/lib/Drupal/Core/Database/StatementPrefetch.php b/core/lib/Drupal/Core/Database/StatementPrefetch.php index 0e3b98d228c..7a64b49757a 100644 --- a/core/lib/Drupal/Core/Database/StatementPrefetch.php +++ b/core/lib/Drupal/Core/Database/StatementPrefetch.php @@ -8,7 +8,7 @@ use Drupal\Core\Database\Event\StatementExecutionEndEvent; use Drupal\Core\Database\Event\StatementExecutionStartEvent; /** - * An implementation of StatementInterface that prefetches all data. + * An implementation of StatementInterface that pre-fetches all data. * * This class behaves very similar to a StatementWrapper of a \PDOStatement * but as it always fetches every row it is possible to manipulate those diff --git a/core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php b/core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php index 7fdf31912a6..f160c9d9c37 100644 --- a/core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php +++ b/core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php @@ -12,6 +12,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpKernel\Event\ResponseEvent; use Symfony\Component\HttpKernel\KernelEvents; +// cspell:ignore noemptytag /** * Subscribes to filter HTML responses, to set the 'is-active' class on links. * diff --git a/core/lib/Drupal/Core/Installer/Form/SiteConfigureForm.php b/core/lib/Drupal/Core/Installer/Form/SiteConfigureForm.php index a8f98d3cc4d..d5221dacfc6 100644 --- a/core/lib/Drupal/Core/Installer/Form/SiteConfigureForm.php +++ b/core/lib/Drupal/Core/Installer/Form/SiteConfigureForm.php @@ -293,7 +293,7 @@ class SiteConfigureForm extends ConfigFormBase { } } - // We precreated user 1 with placeholder values. Let's save the real values. + // We created user 1 with placeholder values. Let's save the real values. $account = $this->userStorage->load(1); $account->init = $account->mail = $account_values['mail']; $account->roles = $account->getRoles(); diff --git a/core/lib/Drupal/Core/Routing/RoutePreloader.php b/core/lib/Drupal/Core/Routing/RoutePreloader.php index eb2d13e6986..673cebfd9f5 100644 --- a/core/lib/Drupal/Core/Routing/RoutePreloader.php +++ b/core/lib/Drupal/Core/Routing/RoutePreloader.php @@ -11,7 +11,7 @@ use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\Routing\Route; /** - * Defines a class which preloads non-admin routes. + * Defines a class that can pre-load non-admin routes. * * On an actual site we want to avoid too many database queries so we build a * list of all routes which most likely appear on the actual site, which are all diff --git a/core/lib/Drupal/Core/Session/SessionManager.php b/core/lib/Drupal/Core/Session/SessionManager.php index 88cd771dda4..e64a060978c 100644 --- a/core/lib/Drupal/Core/Session/SessionManager.php +++ b/core/lib/Drupal/Core/Session/SessionManager.php @@ -105,7 +105,7 @@ class SessionManager extends NativeSessionStorage implements SessionManagerInter // If a session cookie exists, initialize the session. Otherwise the // session is only started on demand in save(), making // anonymous users not use a session cookie unless something is stored in - // $_SESSION. This allows HTTP proxies to cache anonymous pageviews. + // $_SESSION. This allows HTTP proxies to cache anonymous page views. $result = $this->startNow(); } diff --git a/core/misc/cspell/dictionary.txt b/core/misc/cspell/dictionary.txt index 47b61954fa8..30e1282967d 100644 --- a/core/misc/cspell/dictionary.txt +++ b/core/misc/cspell/dictionary.txt @@ -730,7 +730,6 @@ narf navs nbaz nbchoices -ndelay ndocs nearbykeyword necolas @@ -753,20 +752,15 @@ noadd noblanks nocache nocase -nocdata nocookie nodelist nodir nodo -noemptytag -noevent nofields nojs nolink nomask -nonamespace nonconfigurable -nonexistingfilename nonoptional noquotes noschema @@ -774,7 +768,6 @@ nosniff nostart notag notexisting -nothere notnull notsimpletest nourriture @@ -789,7 +782,6 @@ oembed officedocument olivero olivero's -omitscript omittable onecol oneplusfourgrid @@ -811,13 +803,10 @@ overridable overrider overrider's overriders -overridetest owasp oypa -pageable pagecache pagetop -pageviews pagina paramconverter parens @@ -844,7 +833,6 @@ phpserialize phpspec phpstan phpunit -phpunit's pianura pickable picturefill @@ -871,12 +859,9 @@ postorder postprocess postupdate poweredby -powriter prebar precache -preconfigure preconfigured -precreated predelete prefixsqlite prefoo diff --git a/core/modules/language/tests/language_config_override_test/language_config_override_test.info.yml b/core/modules/language/tests/language_config_override_test/language_config_override_test.info.yml index fae9e3c0356..0a63710a27f 100644 --- a/core/modules/language/tests/language_config_override_test/language_config_override_test.info.yml +++ b/core/modules/language/tests/language_config_override_test/language_config_override_test.info.yml @@ -1,4 +1,4 @@ -name: 'Language config overridetest' +name: 'Language config override test' type: module description: 'Support module for the language config override test.' package: Testing diff --git a/core/modules/media/src/OEmbed/ResourceFetcher.php b/core/modules/media/src/OEmbed/ResourceFetcher.php index 62b39499fe3..789fb82aeb5 100644 --- a/core/modules/media/src/OEmbed/ResourceFetcher.php +++ b/core/modules/media/src/OEmbed/ResourceFetcher.php @@ -8,6 +8,8 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\TransferException; use GuzzleHttp\RequestOptions; +// cspell:ignore nocdata + /** * Fetches and caches oEmbed resources. */ diff --git a/core/modules/media/src/OEmbed/UrlResolver.php b/core/modules/media/src/OEmbed/UrlResolver.php index c7d0e603259..716745ab762 100644 --- a/core/modules/media/src/OEmbed/UrlResolver.php +++ b/core/modules/media/src/OEmbed/UrlResolver.php @@ -9,6 +9,8 @@ use Drupal\Core\Extension\ModuleHandlerInterface; use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\TransferException; +// cspell:ignore omitscript + /** * Converts oEmbed media URLs into endpoint-specific resource URLs. */ diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/EntityReferenceTranslationDeriver.php b/core/modules/migrate_drupal/src/Plugin/migrate/EntityReferenceTranslationDeriver.php index c3e80e65be1..dd1a68879c2 100644 --- a/core/modules/migrate_drupal/src/Plugin/migrate/EntityReferenceTranslationDeriver.php +++ b/core/modules/migrate_drupal/src/Plugin/migrate/EntityReferenceTranslationDeriver.php @@ -189,7 +189,7 @@ class EntityReferenceTranslationDeriver extends DeriverBase implements Container // If this is an existing derivative, it means this bundle has more // than one entity reference field. In that case, we only want to // add the field to the process pipeline and add it to - // overwrite_properties so it can be over written. + // overwrite_properties so it can be overwritten. $this->derivatives[$derivative_key]['process'] += $derivative['process']; $this->derivatives[$derivative_key]['destination']['overwrite_properties'] += $derivative['destination']['overwrite_properties']; } diff --git a/core/modules/syslog/src/Logger/SysLog.php b/core/modules/syslog/src/Logger/SysLog.php index 93edfd917b1..ee3c7da4028 100644 --- a/core/modules/syslog/src/Logger/SysLog.php +++ b/core/modules/syslog/src/Logger/SysLog.php @@ -7,6 +7,8 @@ use Drupal\Core\Logger\LogMessageParserInterface; use Drupal\Core\Logger\RfcLoggerTrait; use Psr\Log\LoggerInterface; +// cspell:ignore ndelay + /** * Redirects logging messages to syslog. */ diff --git a/core/modules/system/tests/modules/pager_test/src/Controller/PagerTestController.php b/core/modules/system/tests/modules/pager_test/src/Controller/PagerTestController.php index 2cdba660120..ded2f19551c 100644 --- a/core/modules/system/tests/modules/pager_test/src/Controller/PagerTestController.php +++ b/core/modules/system/tests/modules/pager_test/src/Controller/PagerTestController.php @@ -39,7 +39,7 @@ class PagerTestController extends ControllerBase implements TrustedCallbackInter } /** - * Builds a render array for a pageable test table. + * Builds a render array for a multi-page test table. * * @param int $element * The pager element to be used for paging. diff --git a/core/modules/update/update.compare.inc b/core/modules/update/update.compare.inc index d1b5a8e73de..78d2bdcaf82 100644 --- a/core/modules/update/update.compare.inc +++ b/core/modules/update/update.compare.inc @@ -462,7 +462,7 @@ function update_calculate_project_update_status(&$project_data, $available) { } // Look for the 'recommended' version if we haven't found it yet (see - // phpdoc at the top of this function for the definition). + // PHPDoc at the top of this function for the definition). if (!isset($project_data['recommended']) && $release_major_version == $target_major) { if ($recommended_version_without_extra !== $release_version_without_extra) { diff --git a/core/modules/views/src/Plugin/views/style/Table.php b/core/modules/views/src/Plugin/views/style/Table.php index 10f7db58c7b..afca869af34 100644 --- a/core/modules/views/src/Plugin/views/style/Table.php +++ b/core/modules/views/src/Plugin/views/style/Table.php @@ -170,7 +170,7 @@ class Table extends StylePluginBase implements CacheableDependencyInterface { if ($fields === NULL) { $fields = $this->displayHandler->getOption('fields'); } - // Preconfigure the sanitized array so that the order is retained. + // Pre-configure the sanitized array so that the order is retained. foreach ($fields as $field => $info) { // Set to itself so that if it isn't touched, it gets column // status automatically. diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigCRUDTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigCRUDTest.php index 6b0ba0ae161..dff432ba3d6 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigCRUDTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigCRUDTest.php @@ -190,7 +190,7 @@ class ConfigCRUDTest extends KernelTestBase { */ public function testNameValidation() { // Verify that an object name without namespace causes an exception. - $name = 'nonamespace'; + $name = 'no_namespace'; try { $this->config($name)->save(); $this->fail('Expected ConfigNameException was thrown for a name without a namespace.'); diff --git a/core/tests/Drupal/KernelTests/Core/Database/TaggingTest.php b/core/tests/Drupal/KernelTests/Core/Database/TaggingTest.php index 3a9ea2c7e6e..2699ba77b51 100644 --- a/core/tests/Drupal/KernelTests/Core/Database/TaggingTest.php +++ b/core/tests/Drupal/KernelTests/Core/Database/TaggingTest.php @@ -123,7 +123,7 @@ class TaggingTest extends DatabaseTestBase { $return = $query->getMetaData('test'); $this->assertEquals($data, $return, 'Correct metadata returned.'); - $return = $query->getMetaData('nothere'); + $return = $query->getMetaData('not_here'); $this->assertNull($return, 'Non-existent key returned NULL.'); } diff --git a/core/tests/Drupal/KernelTests/Core/File/ReadOnlyStreamWrapperTest.php b/core/tests/Drupal/KernelTests/Core/File/ReadOnlyStreamWrapperTest.php index 5f8d6eadf3f..a37b087e665 100644 --- a/core/tests/Drupal/KernelTests/Core/File/ReadOnlyStreamWrapperTest.php +++ b/core/tests/Drupal/KernelTests/Core/File/ReadOnlyStreamWrapperTest.php @@ -78,7 +78,7 @@ class ReadOnlyStreamWrapperTest extends FileTestBase { // Attempt to close the stream. (Suppress errors, as fclose triggers fflush.) $this->assertTrue(fclose($handle), 'Able to close file using the read_only stream wrapper.'); // Test the rename() function - $this->assertFalse(@rename($uri, $this->scheme . '://newname.txt'), 'Unable to rename files using the read-only stream wrapper.'); + $this->assertFalse(@rename($uri, $this->scheme . '://new_name.txt'), 'Unable to rename files using the read-only stream wrapper.'); // Test the unlink() function $this->assertTrue(@$file_system->unlink($uri), 'Able to unlink file using read-only stream wrapper.'); $this->assertFileExists($filepath); diff --git a/core/tests/Drupal/KernelTests/Core/File/ScanDirectoryTest.php b/core/tests/Drupal/KernelTests/Core/File/ScanDirectoryTest.php index 2d1fa47c9ea..577e0bc47fd 100644 --- a/core/tests/Drupal/KernelTests/Core/File/ScanDirectoryTest.php +++ b/core/tests/Drupal/KernelTests/Core/File/ScanDirectoryTest.php @@ -78,7 +78,7 @@ class ScanDirectoryTest extends FileTestBase { public function testOptionCallback() { // When nothing is matched nothing should be passed to the callback. - $all_files = $this->fileSystem->scanDirectory($this->path, '/^NONEXISTINGFILENAME/', ['callback' => 'file_test_file_scan_callback']); + $all_files = $this->fileSystem->scanDirectory($this->path, '/^NON-EXISTING-FILENAME/', ['callback' => 'file_test_file_scan_callback']); $this->assertCount(0, $all_files, 'No files were found.'); $results = file_test_file_scan_callback(); file_test_file_scan_callback_reset(); diff --git a/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php b/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php index 82d9fe03027..39f2e7b8281 100644 --- a/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php +++ b/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php @@ -310,7 +310,7 @@ class ContainerAwareEventDispatcherTest extends TestCase { $this->dispatcher->dispatch(new Event(), self::PREFOO); $this->assertTrue($this->listener->preFooInvoked); $this->assertFalse($this->listener->postFooInvoked); - $this->assertInstanceOf(Event::class, $this->dispatcher->dispatch(new Event(), 'noevent')); + $this->assertInstanceOf(Event::class, $this->dispatcher->dispatch(new Event(), 'no_event')); $this->assertInstanceOf(Event::class, $this->dispatcher->dispatch(new Event(), self::PREFOO)); // Any kind of object can be dispatched, not only instances of Event. $this->assertInstanceOf(\stdClass::class, $this->dispatcher->dispatch(new \stdClass(), self::PREFOO)); diff --git a/core/tests/Drupal/Tests/Component/Gettext/PoStreamWriterTest.php b/core/tests/Drupal/Tests/Component/Gettext/PoStreamWriterTest.php index cd04a4f3b5a..b9127a408b8 100644 --- a/core/tests/Drupal/Tests/Component/Gettext/PoStreamWriterTest.php +++ b/core/tests/Drupal/Tests/Component/Gettext/PoStreamWriterTest.php @@ -44,7 +44,7 @@ class PoStreamWriterTest extends TestCase { $this->poWriter->setHeader($poHeader->reveal()); $root = vfsStream::setup(); - $this->poFile = new vfsStreamFile('powriter.po'); + $this->poFile = new vfsStreamFile('poWriter.po'); $root->addChild($this->poFile); } diff --git a/core/tests/bootstrap.php b/core/tests/bootstrap.php index 34778e39cff..295abc42659 100644 --- a/core/tests/bootstrap.php +++ b/core/tests/bootstrap.php @@ -118,8 +118,8 @@ if (!defined('PHPUNIT_COMPOSER_INSTALL')) { * Populate class loader with additional namespaces for tests. * * We run this in a function to avoid setting the class loader to a global - * that can change. This change can cause unpredictable false positives for - * phpunit's global state change watcher. The class loader can be retrieved from + * that can change. This change can cause unpredictable false positives for the + * PHPUnit global state change watcher. The class loader can be retrieved from * composer at any time by requiring autoload.php. */ function drupal_phpunit_populate_class_loader() {