diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index 53fbb992eaab..36c9c741a8c9 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -11,6 +11,8 @@ use Drupal\Core\Test\TestDatabase; use Drupal\Core\Utility\Error; use Drupal\Core\StringTranslation\TranslatableMarkup; +// cspell:ignore htkey + /** * Error reporting level: display no errors. */ diff --git a/core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php b/core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php index 960c4869ff87..46e452db78ef 100644 --- a/core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php +++ b/core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php @@ -1004,7 +1004,7 @@ final class DocParser private function PlainValue() { if ($this->lexer->isNextToken(DocLexer::T_OPEN_CURLY_BRACES)) { - return $this->Arrayx(); + return $this->ArrayX(); } if ($this->lexer->isNextToken(DocLexer::T_AT)) { @@ -1070,7 +1070,7 @@ final class DocParser * * @return array */ - private function Arrayx() + private function ArrayX() { $array = $values = array(); diff --git a/core/lib/Drupal/Component/Utility/ToStringTrait.php b/core/lib/Drupal/Component/Utility/ToStringTrait.php index 9364fadaa873..2a77c7b53dfa 100644 --- a/core/lib/Drupal/Component/Utility/ToStringTrait.php +++ b/core/lib/Drupal/Component/Utility/ToStringTrait.php @@ -3,7 +3,7 @@ namespace Drupal\Component\Utility; /** - * Wraps __toString in a trait to avoid some fatals. + * Wraps __toString in a trait to avoid some fatal errors. */ trait ToStringTrait { diff --git a/core/lib/Drupal/Core/Config/Schema/Element.php b/core/lib/Drupal/Core/Config/Schema/Element.php index 52be95c97797..a0c7c1174135 100644 --- a/core/lib/Drupal/Core/Config/Schema/Element.php +++ b/core/lib/Drupal/Core/Config/Schema/Element.php @@ -45,7 +45,7 @@ abstract class Element extends TypedData { * The typed config manager. This must be an instance of * \Drupal\Core\Config\TypedConfigManagerInterface. If it is not, then this * method will error when assertions are enabled. We can not narrow the - * typehint as this will cause PHP errors. + * type hint as this will cause PHP errors. * * @return $this */ diff --git a/core/lib/Drupal/Core/Form/form.api.php b/core/lib/Drupal/Core/Form/form.api.php index 572f22003fd1..0502ea323921 100644 --- a/core/lib/Drupal/Core/Form/form.api.php +++ b/core/lib/Drupal/Core/Form/form.api.php @@ -50,7 +50,7 @@ * all operations have finished, this is passed to callback_batch_finished() * where results may be referenced to display information to the end-user, * such as how many total items were processed. - * It is discouraged to typehint this parameter as an array, to allow an + * It is discouraged to type hint this parameter as an array, to allow an * object implement \ArrayAccess to be passed. */ function callback_batch_operation($multiple_params, &$context) { diff --git a/core/lib/Drupal/Core/TempStore/PrivateTempStore.php b/core/lib/Drupal/Core/TempStore/PrivateTempStore.php index 1815de4a6298..115ff35ddd8b 100644 --- a/core/lib/Drupal/Core/TempStore/PrivateTempStore.php +++ b/core/lib/Drupal/Core/TempStore/PrivateTempStore.php @@ -102,7 +102,7 @@ class PrivateTempStore { * The data associated with the key, or NULL if the key does not exist. */ public function get($key) { - $key = $this->createkey($key); + $key = $this->createKey($key); if (($object = $this->storage->get($key)) && ($object->owner == $this->getOwner())) { return $object->data; } @@ -132,7 +132,7 @@ class PrivateTempStore { } } - $key = $this->createkey($key); + $key = $this->createKey($key); if (!$this->lockBackend->acquire($key)) { $this->lockBackend->wait($key); if (!$this->lockBackend->acquire($key)) { @@ -160,7 +160,7 @@ class PrivateTempStore { * NULL otherwise. */ public function getMetadata($key) { - $key = $this->createkey($key); + $key = $this->createKey($key); // Fetch the key/value pair and its metadata. $object = $this->storage->get($key); if ($object) { @@ -184,7 +184,7 @@ class PrivateTempStore { * Thrown when a lock for the backend storage could not be acquired. */ public function delete($key) { - $key = $this->createkey($key); + $key = $this->createKey($key); if (!$object = $this->storage->get($key)) { return TRUE; } @@ -211,7 +211,7 @@ class PrivateTempStore { * @return string * The unique key for the user. */ - protected function createkey($key) { + protected function createKey($key) { return $this->getOwner() . ':' . $key; } diff --git a/core/misc/cspell/dictionary.txt b/core/misc/cspell/dictionary.txt index 29a20c77a993..97b7928067c8 100644 --- a/core/misc/cspell/dictionary.txt +++ b/core/misc/cspell/dictionary.txt @@ -9,7 +9,6 @@ adminforms afterclose aftercreate ahah -ajaxcallback ajaxing allwords alphadecimal @@ -20,7 +19,6 @@ applix archiver archivers arrakis -arrayx arrowrefresh arrowreturn arrowreturnthick @@ -163,7 +161,6 @@ controlgroup conv corge cpio -createkey createrole createuser crema @@ -274,7 +271,6 @@ falsey falsish fapi fastcgi -fatals favourite favstar fcgi @@ -336,7 +332,6 @@ hoglet hookname hosters hrefs -htkey htmlcorrector httpheader httplug @@ -350,7 +345,6 @@ idekey iframes iframeupload imagecache -imagecreatefrom imagetextalternative indexname inited @@ -426,7 +420,6 @@ mank maryjane matchout mathematica -maxage maximumred maxlifetime maynot @@ -798,9 +791,6 @@ testcase testcontent testcontextawareblock testdialog -testfilter -testfunc -testfunction testgroups testkey testlogger @@ -852,7 +842,6 @@ troopal truecolor twistie twocol -typehint tzid uids ulwa diff --git a/core/modules/content_moderation/src/Form/ContentModerationConfigureEntityTypesForm.php b/core/modules/content_moderation/src/Form/ContentModerationConfigureEntityTypesForm.php index d13ce9301c5d..427ee1fd99cc 100644 --- a/core/modules/content_moderation/src/Form/ContentModerationConfigureEntityTypesForm.php +++ b/core/modules/content_moderation/src/Form/ContentModerationConfigureEntityTypesForm.php @@ -161,14 +161,14 @@ class ContentModerationConfigureEntityTypesForm extends FormBase { '#button_type' => 'primary', '#value' => $this->t('Save'), '#ajax' => [ - 'callback' => [$this, 'ajaxcallback'], + 'callback' => [$this, 'ajaxCallback'], ], ]; $form['actions']['cancel'] = [ '#type' => 'button', '#value' => $this->t('Cancel'), '#ajax' => [ - 'callback' => [$this, 'ajaxcallback'], + 'callback' => [$this, 'ajaxCallback'], ], ]; diff --git a/core/modules/file/src/Plugin/migrate/process/d6/FieldFile.php b/core/modules/file/src/Plugin/migrate/process/d6/FieldFile.php index eb378a09699a..6845b154f4eb 100644 --- a/core/modules/file/src/Plugin/migrate/process/d6/FieldFile.php +++ b/core/modules/file/src/Plugin/migrate/process/d6/FieldFile.php @@ -73,7 +73,7 @@ class FieldFile extends ProcessPluginBase implements ContainerFactoryPluginInter // means the file referenced by the current field item did not migrate for // some reason -- file migration is notoriously brittle -- and we do NOT // want to send invalid file references into the field system (it causes - // fatals), so return an empty item instead. + // fatal errors), so return an empty item instead. $lookup_result = $this->migrateLookup->lookup('d6_file', [$value['fid']]); if ($lookup_result) { return [ diff --git a/core/modules/filter/tests/src/Unit/FilterHtmlTest.php b/core/modules/filter/tests/src/Unit/FilterHtmlTest.php index d020f1d0197a..7733948534cf 100644 --- a/core/modules/filter/tests/src/Unit/FilterHtmlTest.php +++ b/core/modules/filter/tests/src/Unit/FilterHtmlTest.php @@ -42,12 +42,12 @@ class FilterHtmlTest extends UnitTestCase { * @param string $expected * The expected output string. */ - public function testfilterAttributes($html, $expected) { + public function testFilterAttributes($html, $expected) { $this->assertSame($expected, $this->filter->filterAttributes($html)); } /** - * Provides data for testfilterAttributes. + * Provides data for testFilterAttributes. * * @return array * An array of test data. diff --git a/core/modules/page_cache/tests/src/Functional/PageCacheTest.php b/core/modules/page_cache/tests/src/Functional/PageCacheTest.php index 9824e196252a..6d3f618a5d97 100644 --- a/core/modules/page_cache/tests/src/Functional/PageCacheTest.php +++ b/core/modules/page_cache/tests/src/Functional/PageCacheTest.php @@ -268,7 +268,7 @@ class PageCacheTest extends BrowserTestBase { // Until bubbling of max-age up to the response is supported, verify that // a custom #cache max-age set on an element does not affect page max-age. $this->drupalLogout(); - $this->drupalGet('system-test/cache_maxage_page'); + $this->drupalGet('system-test/cache_max_age_page'); $this->assertSession()->responseHeaderEquals('Cache-Control', 'max-age=300, public'); } diff --git a/core/modules/rest/src/RequestHandler.php b/core/modules/rest/src/RequestHandler.php index a435e3ef0cc3..6af909d78434 100644 --- a/core/modules/rest/src/RequestHandler.php +++ b/core/modules/rest/src/RequestHandler.php @@ -247,7 +247,7 @@ class RequestHandler implements ContainerInjectionInterface { // methods historically receive the unserialized request body as the N+1th // method argument, where N is the number of route parameters specified on // the accompanying route. To be able to use the argument resolver, which is - // not based on position but on name and typehint, specify commonly used + // not based on position but on name and type hint, specify commonly used // names here. Similarly, those methods receive the original stored object // as the first method argument. diff --git a/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php b/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php index 8ba8e9c82f19..977280cc764c 100644 --- a/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php +++ b/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php @@ -15,7 +15,7 @@ use Drupal\Core\StreamWrapper\StreamWrapperManagerInterface; use Psr\Log\LoggerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; -// cspell:ignore rrggbb +// cspell:ignore imagecreatefrom rrggbb /** * Defines the GD2 toolkit for image manipulation within Drupal. diff --git a/core/modules/system/tests/modules/error_test/error_test.routing.yml b/core/modules/system/tests/modules/error_test/error_test.routing.yml index ad961520da0f..de1c0770d5d1 100644 --- a/core/modules/system/tests/modules/error_test/error_test.routing.yml +++ b/core/modules/system/tests/modules/error_test/error_test.routing.yml @@ -5,10 +5,10 @@ error_test.generate_warnings: requirements: _access: 'TRUE' -error_test.generate_fatals: - path: '/error-test/generate-fatals' +error_test.generate_fatal_errors: + path: '/error-test/generate-fatal-errors' defaults: - _controller: '\Drupal\error_test\Controller\ErrorTestController::generateFatals' + _controller: '\Drupal\error_test\Controller\ErrorTestController::generateFatalErrors' requirements: _access: 'TRUE' diff --git a/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php b/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php index d2845e6d5ac0..120108376260 100644 --- a/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php +++ b/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php @@ -56,9 +56,9 @@ class ErrorTestController extends ControllerBase { } /** - * Generate fatals to test the error handler. + * Generate fatal errors to test the error handler. */ - public function generateFatals() { + public function generateFatalErrors() { $function = function (array $test) { }; diff --git a/core/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php b/core/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php index 6b6ef7686f5e..6107402e6a9f 100644 --- a/core/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php +++ b/core/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php @@ -263,7 +263,7 @@ class SystemTestController extends ControllerBase implements TrustedCallbackInte /** * Set cache max-age on the returned render array. */ - public function system_test_cache_maxage_page() { + public function system_test_cache_max_age_page() { $build['main'] = [ '#cache' => ['max-age' => 90], 'message' => [ diff --git a/core/modules/system/tests/modules/system_test/system_test.routing.yml b/core/modules/system/tests/modules/system_test/system_test.routing.yml index 74b836e2592c..78135051a071 100644 --- a/core/modules/system/tests/modules/system_test/system_test.routing.yml +++ b/core/modules/system/tests/modules/system_test/system_test.routing.yml @@ -76,10 +76,10 @@ system_test.cache_tags_page: requirements: _access: 'TRUE' -system_test.cache_maxage_page: - path: '/system-test/cache_maxage_page' +system_test.cache_max_age_page: + path: '/system-test/cache_max_age_page' defaults: - _controller: '\Drupal\system_test\Controller\SystemTestController::system_test_cache_maxage_page' + _controller: '\Drupal\system_test\Controller\SystemTestController::system_test_cache_max_age_page' requirements: _access: 'TRUE' diff --git a/core/modules/system/tests/modules/twig_extension_test/src/TwigExtension/TestExtension.php b/core/modules/system/tests/modules/twig_extension_test/src/TwigExtension/TestExtension.php index 753c90f2f4b5..1c32550d9570 100644 --- a/core/modules/system/tests/modules/twig_extension_test/src/TwigExtension/TestExtension.php +++ b/core/modules/system/tests/modules/twig_extension_test/src/TwigExtension/TestExtension.php @@ -18,14 +18,14 @@ class TestExtension extends AbstractExtension { * A key/value array that defines custom Twig functions. The key denotes the * function name used in the tag, e.g.: * @code - * {{ testfunc() }} + * {{ custom_function() }} * @endcode * * The value is a standard PHP callback that defines what the function does. */ public function getFunctions() { return [ - 'testfunc' => new TwigFunction('testfunc', ['Drupal\twig_extension_test\TwigExtension\TestExtension', 'testFunction']), + 'custom_function' => new TwigFunction('custom_function', ['Drupal\twig_extension_test\TwigExtension\TestExtension', 'testFunction']), ]; } @@ -36,14 +36,14 @@ class TestExtension extends AbstractExtension { * A key/value array that defines custom Twig filters. The key denotes the * filter name used in the tag, e.g.: * @code - * {{ foo|testfilter }} + * {{ foo|test_filter }} * @endcode * * The value is a standard PHP callback that defines what the filter does. */ public function getFilters() { return [ - 'testfilter' => new TwigFilter('testfilter', ['Drupal\twig_extension_test\TwigExtension\TestExtension', 'testFilter']), + 'test_filter' => new TwigFilter('test_filter', ['Drupal\twig_extension_test\TwigExtension\TestExtension', 'testFilter']), ]; } diff --git a/core/modules/system/tests/modules/twig_extension_test/templates/twig_extension_test.filter.html.twig b/core/modules/system/tests/modules/twig_extension_test/templates/twig_extension_test.filter.html.twig index 981874fcdc74..04ffb2b7f281 100644 --- a/core/modules/system/tests/modules/twig_extension_test/templates/twig_extension_test.filter.html.twig +++ b/core/modules/system/tests/modules/twig_extension_test/templates/twig_extension_test.filter.html.twig @@ -1,5 +1,5 @@ -