From b041cd994bd59defb992145e0fbc6e8cb4dea020 Mon Sep 17 00:00:00 2001
From: nod_ <nod_@598310.no-reply.drupal.org>
Date: Thu, 30 Jan 2025 11:19:10 +0100
Subject: [PATCH] Issue #3497100 by quietone, smustgrave: Fix LineLength for
 @todo comments

---
 core/lib/Drupal/Core/Database/Schema.php           | 10 +++++-----
 core/lib/Drupal/Core/Hook/HookCollectorPass.php    |  3 ++-
 core/lib/Drupal/Core/Render/Element/Table.php      |  5 +++--
 core/modules/comment/src/CommentManager.php        |  2 +-
 core/modules/comment/src/Hook/CommentHooks.php     |  4 ++--
 .../views/sort/StatisticsLastCommentName.php       |  6 +++---
 .../tests/src/Functional/ConfigInstallWebTest.php  |  7 ++++---
 .../src/Hook/ContentModerationHooks.php            |  2 +-
 .../Controller/ContentTranslationController.php    | 12 +++++++-----
 .../src/Hook/ContentTranslationHooks.php           |  5 ++---
 .../tests/src/Functional/ImageDimensionsTest.php   |  1 +
 .../media_library/src/Hook/MediaLibraryHooks.php   |  7 ++++---
 core/modules/menu_ui/src/Hook/MenuUiHooks.php      |  9 +++++----
 .../navigation/src/Hook/NavigationHooks.php        |  3 ++-
 .../node/tests/src/Functional/NodeEditFormTest.php |  3 ++-
 .../tests/src/Kernel/pgsql/NonPublicSchemaTest.php | 14 ++++++++++----
 .../settings_tray/src/Hook/SettingsTrayHooks.php   |  3 ++-
 .../shortcut/src/ShortcutAccessControlHandler.php  |  6 ++++--
 .../entity_test/src/Hook/EntityTestHooks.php       |  4 ++--
 core/modules/views/src/Hook/ViewsHooks.php         |  6 +++---
 core/modules/views/src/Plugin/views/PluginBase.php |  4 ++--
 .../tests/src/Functional/Handler/FieldWebTest.php  |  1 +
 .../src/Kernel/RenderCacheIntegrationTest.php      |  1 +
 core/modules/views_ui/src/ViewEditForm.php         |  7 ++++---
 core/modules/views_ui/src/ViewUI.php               |  5 +++--
 .../demo_umami/src/Hook/DemoUmamiHooks.php         |  5 +++--
 .../KernelTests/Core/TypedData/TypedDataTest.php   |  8 ++++++--
 27 files changed, 85 insertions(+), 58 deletions(-)

diff --git a/core/lib/Drupal/Core/Database/Schema.php b/core/lib/Drupal/Core/Database/Schema.php
index 3a96fe9b6966..4a6e88efa323 100644
--- a/core/lib/Drupal/Core/Database/Schema.php
+++ b/core/lib/Drupal/Core/Database/Schema.php
@@ -662,11 +662,11 @@ public function createTable($name, $table) {
    * @throws \BadMethodCallException
    *   If the method is not implemented in the concrete driver class.
    *
-   * @todo This method is called by Schema::createTable on the abstract class, and
-   *   therefore should be defined as well on the abstract class to prevent static
-   *   analysis errors. In D11, consider changing it to an abstract method, or to
-   *   make it private for each driver, and ::createTable actually an abstract
-   *   method here for implementation in each driver.
+   * @todo This method is called by Schema::createTable on the abstract class,
+   *   and therefore should be defined as well on the abstract class to prevent
+   *   static analysis errors. In D11, consider changing it to an abstract
+   *   method, or to make it private for each driver, and ::createTable actually
+   *   an abstract method here for implementation in each driver.
    */
   // phpcs:ignore Drupal.Commenting.FunctionComment.InvalidNoReturn, Drupal.Commenting.FunctionComment.Missing
   protected function createTableSql($name, $table) {
diff --git a/core/lib/Drupal/Core/Hook/HookCollectorPass.php b/core/lib/Drupal/Core/Hook/HookCollectorPass.php
index 158172098d33..3d37c620e533 100644
--- a/core/lib/Drupal/Core/Hook/HookCollectorPass.php
+++ b/core/lib/Drupal/Core/Hook/HookCollectorPass.php
@@ -134,7 +134,8 @@ public function process(ContainerBuilder $container): void {
    * @internal
    *   This method is only used by ModuleHandler.
    *
-   * * @todo Pass only $container when ModuleHandler->add is removed https://www.drupal.org/project/drupal/issues/3481778
+   * @todo Pass only $container when ModuleHandler->add is removed
+   *   https://www.drupal.org/project/drupal/issues/3481778
    */
   public static function collectAllHookImplementations(array $module_filenames, ?ContainerBuilder $container = NULL): static {
     $modules = array_map(fn ($x) => preg_quote($x, '/'), array_keys($module_filenames));
diff --git a/core/lib/Drupal/Core/Render/Element/Table.php b/core/lib/Drupal/Core/Render/Element/Table.php
index 7421d2e56604..8e0ea82e3938 100644
--- a/core/lib/Drupal/Core/Render/Element/Table.php
+++ b/core/lib/Drupal/Core/Render/Element/Table.php
@@ -261,8 +261,9 @@ public static function processTable(&$element, FormStateInterface $form_state, &
           $row['select'] += [
             '#type' => $element['#multiple'] ? 'checkbox' : 'radio',
             '#id' => HtmlUtility::getUniqueId('edit-' . implode('-', $element_parents)),
-            // @todo If rows happen to use numeric indexes instead of string keys,
-            //   this results in a first row with $key === 0, which is always FALSE.
+            // @todo If rows happen to use numeric indexes instead of string
+            //   keys, this results in a first row with $key === 0, which is
+            //   always FALSE.
             '#return_value' => $key,
             '#attributes' => $element['#attributes'],
             '#wrapper_attributes' => [
diff --git a/core/modules/comment/src/CommentManager.php b/core/modules/comment/src/CommentManager.php
index ba26943fe470..64c1a59946f9 100644
--- a/core/modules/comment/src/CommentManager.php
+++ b/core/modules/comment/src/CommentManager.php
@@ -212,7 +212,7 @@ public function getCountNewComments(EntityInterface $entity, $field_name = NULL,
           else {
             // Default to 30 days ago.
             // @todo Remove this else branch when we have a generic
-            //   HistoryRepository service in https://www.drupal.org/node/3267011.
+            //   HistoryRepository service in https://www.drupal.org/i/3267011.
             $timestamp = COMMENT_NEW_LIMIT;
           }
         }
diff --git a/core/modules/comment/src/Hook/CommentHooks.php b/core/modules/comment/src/Hook/CommentHooks.php
index d70b1e0f713f..ef8f778e0d1d 100644
--- a/core/modules/comment/src/Hook/CommentHooks.php
+++ b/core/modules/comment/src/Hook/CommentHooks.php
@@ -178,8 +178,8 @@ public function fieldConfigDelete(FieldConfigInterface $field) {
   #[Hook('node_links_alter')]
   public function nodeLinksAlter(array &$links, NodeInterface $node, array &$context): void {
     // Comment links are only added to node entity type for backwards
-    // compatibility. Should you require comment links for other entity types you
-    // can do so by implementing a new field formatter.
+    // compatibility. Should you require comment links for other entity types
+    // you can do so by implementing a new field formatter.
     // @todo Make this configurable from the formatter. See
     //   https://www.drupal.org/node/1901110.
     $comment_links = \Drupal::service('comment.link_builder')->buildCommentedEntityLinks($node, $context);
diff --git a/core/modules/comment/src/Plugin/views/sort/StatisticsLastCommentName.php b/core/modules/comment/src/Plugin/views/sort/StatisticsLastCommentName.php
index 17ee2efa75d4..d8bfc591c974 100644
--- a/core/modules/comment/src/Plugin/views/sort/StatisticsLastCommentName.php
+++ b/core/modules/comment/src/Plugin/views/sort/StatisticsLastCommentName.php
@@ -38,9 +38,9 @@ public function query() {
     ];
     $join = \Drupal::service('plugin.manager.views.join')->createInstance('standard', $definition);
 
-    // @todo this might be safer if we had an ensure_relationship rather than guessing
-    // the table alias. Though if we did that we'd be guessing the relationship name
-    // so that doesn't matter that much.
+    // @todo this might be safer if we had an ensure_relationship rather than
+    //   guessing the table alias. Though if we did that we'd be guessing the
+    //   relationship name so that doesn't matter that much.
     $this->user_table = $this->query->ensureTable('ces_users', $this->relationship, $join);
     $this->user_field = $this->query->addField($this->user_table, 'name');
 
diff --git a/core/modules/config/tests/src/Functional/ConfigInstallWebTest.php b/core/modules/config/tests/src/Functional/ConfigInstallWebTest.php
index f2089984da6e..2859a4763b81 100644
--- a/core/modules/config/tests/src/Functional/ConfigInstallWebTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigInstallWebTest.php
@@ -87,9 +87,10 @@ public function testIntegrationModuleReinstallation(): void {
     $config_entity->set('label', 'Customized integration config label')->save();
 
     // @todo FIXME: Setting config keys WITHOUT SAVING retains the changed config
-    //   object in memory. Every new call to $this->config() MUST revert in-memory changes
-    //   that haven't been saved!
-    //   In other words: This test passes even without this reset, but it shouldn't.
+    //   object in memory. Every new call to $this->config() MUST revert
+    //   in-memory changes that haven't been saved!
+    //   In other words: This test passes even without this reset, but it
+    //   shouldn't.
     $this->container->get('config.factory')->reset();
 
     // Disable and uninstall the integration module.
diff --git a/core/modules/content_moderation/src/Hook/ContentModerationHooks.php b/core/modules/content_moderation/src/Hook/ContentModerationHooks.php
index 9d8ecab3d53f..2d0f38877477 100644
--- a/core/modules/content_moderation/src/Hook/ContentModerationHooks.php
+++ b/core/modules/content_moderation/src/Hook/ContentModerationHooks.php
@@ -364,7 +364,7 @@ public function workflowUpdate(WorkflowInterface $entity) {
   #[Hook('views_post_execute')]
   public function viewsPostExecute(ViewExecutable $view): void {
     // @todo Remove this once broken handlers in views configuration result in
-    //   a view no longer returning results. https://www.drupal.org/node/2907954.
+    //   a view no longer returning results. https://www.drupal.org/i/2907954.
     foreach ($view->filter as $id => $filter) {
       if (str_starts_with($id, 'moderation_state') && $filter instanceof Broken) {
         $view->result = [];
diff --git a/core/modules/content_translation/src/Controller/ContentTranslationController.php b/core/modules/content_translation/src/Controller/ContentTranslationController.php
index 75c9d8dd943d..ac811c36c9c4 100644
--- a/core/modules/content_translation/src/Controller/ContentTranslationController.php
+++ b/core/modules/content_translation/src/Controller/ContentTranslationController.php
@@ -397,9 +397,10 @@ public function add(LanguageInterface $source, LanguageInterface $target, RouteM
     // See https://www.drupal.org/node/1810394.
     $this->prepareTranslation($entity, $source, $target);
 
-    // @todo Provide a way to figure out the default form operation. Maybe like
+    // @todo Provide a way to figure out the default form operation in
+    //   https://www.drupal.org/node/2006348. Maybe like
+    // phpcs:ignore
     //   $operation = isset($info['default_operation']) ? $info['default_operation'] : 'default';
-    //   See https://www.drupal.org/node/2006348.
 
     // Use the add form handler, if available, otherwise default.
     $operation = $entity->getEntityType()->hasHandlerClass('form', 'add') ? 'add' : 'default';
@@ -430,9 +431,10 @@ public function add(LanguageInterface $source, LanguageInterface $target, RouteM
   public function edit(LanguageInterface $language, RouteMatchInterface $route_match, $entity_type_id = NULL) {
     $entity = $route_match->getParameter($entity_type_id);
 
-    // @todo Provide a way to figure out the default form operation. Maybe like
-    //   $operation = isset($info['default_operation']) ? $info['default_operation'] : 'default';
-    //   See https://www.drupal.org/node/2006348.
+    // @todo Provide a way to figure out the default form operation in
+    //   https://www.drupal.org/node/2006348. Maybe like
+    // phpcs:ignore
+    //   operation = isset($info['default_operation']) ? $info['default_operation'] : 'default';
 
     // Use the edit form handler, if available, otherwise default.
     $operation = $entity->getEntityType()->hasHandlerClass('form', 'edit') ? 'edit' : 'default';
diff --git a/core/modules/content_translation/src/Hook/ContentTranslationHooks.php b/core/modules/content_translation/src/Hook/ContentTranslationHooks.php
index a85167de1587..bd19dc4f01f9 100644
--- a/core/modules/content_translation/src/Hook/ContentTranslationHooks.php
+++ b/core/modules/content_translation/src/Hook/ContentTranslationHooks.php
@@ -250,9 +250,8 @@ public function entityBaseFieldInfo(EntityTypeInterface $entity_type): array {
       // or it was enabled before, so that we keep translation metadata around
       // when translation is disabled.
       // @todo Re-evaluate this approach and consider removing field storage
-      //   definitions and the related field data if the entity type has no bundle
-      //   enabled for translation.
-      // @see https://www.drupal.org/node/2907777
+      //   definitions and the related field data if the entity type has no
+      //   bundle enabled for translation. See https://www.drupal.org/i/2907777
       if ($manager->isEnabled($entity_type_id) || array_intersect_key($definitions, $installed_storage_definitions)) {
         $info = $definitions;
       }
diff --git a/core/modules/image/tests/src/Functional/ImageDimensionsTest.php b/core/modules/image/tests/src/Functional/ImageDimensionsTest.php
index d65c2c8fa91e..8bc6ef46d853 100644
--- a/core/modules/image/tests/src/Functional/ImageDimensionsTest.php
+++ b/core/modules/image/tests/src/Functional/ImageDimensionsTest.php
@@ -228,6 +228,7 @@ public function testImageDimensions(): void {
     $style->save();
     // @todo Uncomment this once
     //   https://www.drupal.org/project/drupal/issues/2670966 is resolved.
+    // phpcs:ignore
     // $this->assertEquals('<img src="' . $url . '" width="41" height="41" alt="" class="image-style-test" />', $this->getImageTag($variables));
     $this->assertFileDoesNotExist($generated_uri);
     $this->drupalGet($this->getAbsoluteUrl($url));
diff --git a/core/modules/media_library/src/Hook/MediaLibraryHooks.php b/core/modules/media_library/src/Hook/MediaLibraryHooks.php
index 62ca5efffca8..dd46212e8611 100644
--- a/core/modules/media_library/src/Hook/MediaLibraryHooks.php
+++ b/core/modules/media_library/src/Hook/MediaLibraryHooks.php
@@ -172,9 +172,10 @@ public function viewsPostRender(ViewExecutable $view, &$output, CachePluginBase
           }
         }
         // If the current query contains any parameters we use to contextually
-        // filter the view, ensure they persist across AJAX rebuilds.
-        // The ajax_path is shared for all AJAX views on the page, but our query
-        // parameters are prefixed and should not interfere with any other views.
+        // filter the view, ensure they persist across AJAX rebuilds. The
+        // ajax_path is shared for all AJAX views on the page, but our query
+        // parameters are prefixed and should not interfere with any other
+        // views.
         // @todo Rework or remove this in https://www.drupal.org/node/2983451
         if (!empty($query)) {
           $ajax_path =& $output['#attached']['drupalSettings']['views']['ajax_path'];
diff --git a/core/modules/menu_ui/src/Hook/MenuUiHooks.php b/core/modules/menu_ui/src/Hook/MenuUiHooks.php
index a4162b0c7d29..beefde3947b6 100644
--- a/core/modules/menu_ui/src/Hook/MenuUiHooks.php
+++ b/core/modules/menu_ui/src/Hook/MenuUiHooks.php
@@ -91,7 +91,8 @@ public function blockViewSystemMenuBlockAlter(array &$build, BlockPluginInterfac
    */
   #[Hook('form_node_form_alter')]
   public function formNodeFormAlter(&$form, FormStateInterface $form_state) : void {
-    // Generate a list of possible parents (not including this link or descendants).
+    // Generate a list of possible parents (not including this link or
+    // descendants).
     // @todo This must be handled in a #process handler.
     $node = $form_state->getFormObject()->getEntity();
     $defaults = menu_ui_get_menu_link_defaults($node);
@@ -229,9 +230,9 @@ public function formNodeTypeFormAlter(&$form, FormStateInterface $form_state) :
       '#description' => t('Content of this type can be placed in the selected menus.'),
     ];
     // @todo See if we can avoid pre-loading all options by changing the form or
-    //   using a #process callback. https://www.drupal.org/node/2310319
-    //   To avoid an 'illegal option' error after saving the form we have to load
-    //   all available menu parents. Otherwise, it is not possible to dynamically
+    //   using a #process callback. https://www.drupal.org/node/2310319 To avoid
+    //   an 'illegal option' error after saving the form we have to load all
+    //   available menu parents. Otherwise, it is not possible to dynamically
     //   add options to the list using ajax.
     $options_cacheability = new CacheableMetadata();
     $options = $menu_parent_selector->getParentSelectOptions('', NULL, $options_cacheability);
diff --git a/core/modules/navigation/src/Hook/NavigationHooks.php b/core/modules/navigation/src/Hook/NavigationHooks.php
index 2b9d67f022b0..18d523ac299a 100644
--- a/core/modules/navigation/src/Hook/NavigationHooks.php
+++ b/core/modules/navigation/src/Hook/NavigationHooks.php
@@ -175,7 +175,8 @@ public function blockAlter(&$definitions) : void {
     array_walk($definitions, function (&$definition, $block_id) {
       [$base_plugin_id] = explode(PluginBase::DERIVATIVE_SEPARATOR, $block_id);
 
-      // Add the allow_in_navigation attribute to those blocks valid for Navigation.
+      // Add the allow_in_navigation attribute to those blocks valid for
+      // Navigation.
       // @todo Refactor to use actual block Attribute once
       //   https://www.drupal.org/project/drupal/issues/3443882 is merged.
       $allow_in_navigation = [
diff --git a/core/modules/node/tests/src/Functional/NodeEditFormTest.php b/core/modules/node/tests/src/Functional/NodeEditFormTest.php
index 1d3f073168d6..933769be78f8 100644
--- a/core/modules/node/tests/src/Functional/NodeEditFormTest.php
+++ b/core/modules/node/tests/src/Functional/NodeEditFormTest.php
@@ -87,7 +87,8 @@ public function testNodeEdit(): void {
     $this->clickLink('Edit');
     $this->assertSession()->addressEquals($node->toUrl('edit-form'));
 
-    // Check that the title and body fields are displayed with the correct values.
+    // Check that the title and body fields are displayed with the correct
+    // values.
     // @todo Ideally assertLink would support HTML, but it doesn't.
     $this->assertSession()->responseContains('Edit');
     $this->assertSession()->fieldValueEquals($title_key, $edit[$title_key]);
diff --git a/core/modules/pgsql/tests/src/Kernel/pgsql/NonPublicSchemaTest.php b/core/modules/pgsql/tests/src/Kernel/pgsql/NonPublicSchemaTest.php
index 735636a72025..73f861d0b66a 100644
--- a/core/modules/pgsql/tests/src/Kernel/pgsql/NonPublicSchemaTest.php
+++ b/core/modules/pgsql/tests/src/Kernel/pgsql/NonPublicSchemaTest.php
@@ -293,8 +293,11 @@ public function testIndex(): void {
   public function testUniqueKey(): void {
     $this->testingFakeConnection->schema()->addUniqueKey('faking_table', 'test_field', ['test_field']);
 
-    // This should work, but currently indexExist() only searches for keys that end with idx.
-    // @todo remove comments when: https://www.drupal.org/project/drupal/issues/3325358 is committed.
+    // This should work, but currently indexExist() only searches for keys that
+    // end with idx.
+    // @todo remove comments when:
+    //   https://www.drupal.org/project/drupal/issues/3325358 is committed.
+    // phpcs:ignore
     // $this->assertTrue($this->testingFakeConnection->schema()->indexExists('faking_table', 'test_field'));
 
     $results = $this->testingFakeConnection->query("SELECT * FROM pg_indexes WHERE indexname = :indexname", [':indexname' => $this->testingFakeConnection->getPrefix() . 'faking_table__test_field__key'])->fetchAll();
@@ -307,8 +310,11 @@ public function testUniqueKey(): void {
 
     $this->testingFakeConnection->schema()->dropUniqueKey('faking_table', 'test_field');
 
-    // This function will not work due to a the fact that indexExist() does not search for keys without idx tag.
-    // @todo remove comments when: https://www.drupal.org/project/drupal/issues/3325358 is committed.
+    // This function will not work due to a the fact that indexExist() does not
+    // search for keys without idx tag.
+    // @todo remove comments when:
+    //   https://www.drupal.org/project/drupal/issues/3325358 is committed.
+    // phpcs:ignore
     // $this->assertFalse($this->testingFakeConnection->schema()->indexExists('faking_table', 'test_field'));
   }
 
diff --git a/core/modules/settings_tray/src/Hook/SettingsTrayHooks.php b/core/modules/settings_tray/src/Hook/SettingsTrayHooks.php
index 107bce1e9e52..d1b3ed984fdc 100644
--- a/core/modules/settings_tray/src/Hook/SettingsTrayHooks.php
+++ b/core/modules/settings_tray/src/Hook/SettingsTrayHooks.php
@@ -112,7 +112,8 @@ public function toolbarAlter(&$items): void {
       $items['contextual']['#weight'] = -1000;
       $items['contextual']['#attached']['library'][] = 'settings_tray/drupal.settings_tray';
       $items['contextual']['tab']['#attributes']['data-drupal-settingstray'] = 'toggle';
-      // Set a class on items to mark whether they should be active in edit mode.
+      // Set a class on items to mark whether they should be active in edit
+      // mode.
       // @todo Create a dynamic method for modules to set their own items.
       //   https://www.drupal.org/node/2784589.
       $edit_mode_items = ['contextual'];
diff --git a/core/modules/shortcut/src/ShortcutAccessControlHandler.php b/core/modules/shortcut/src/ShortcutAccessControlHandler.php
index 6b39bd126de0..4466ebf07f07 100644
--- a/core/modules/shortcut/src/ShortcutAccessControlHandler.php
+++ b/core/modules/shortcut/src/ShortcutAccessControlHandler.php
@@ -55,7 +55,8 @@ protected function checkAccess(EntityInterface $entity, $operation, AccountInter
       return shortcut_set_edit_access($shortcut_set);
     }
     // @todo Fix this bizarre code: how can a shortcut exist without a shortcut
-    // set? The above if-test is unnecessary. See https://www.drupal.org/node/2339903.
+    //   set? The above if-test is unnecessary. See
+    //   https://www.drupal.org/node/2339903.
     return AccessResult::neutral()->addCacheableDependency($entity);
   }
 
@@ -67,7 +68,8 @@ protected function checkCreateAccess(AccountInterface $account, array $context,
       return shortcut_set_edit_access($shortcut_set);
     }
     // @todo Fix this bizarre code: how can a shortcut exist without a shortcut
-    // set? The above if-test is unnecessary. See https://www.drupal.org/node/2339903.
+    //   set? The above if-test is unnecessary. See
+    //   https://www.drupal.org/node/2339903.
     return AccessResult::neutral();
   }
 
diff --git a/core/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php b/core/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php
index bdaf0416b837..d827a57d4d71 100644
--- a/core/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php
+++ b/core/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php
@@ -113,8 +113,8 @@ public function entityBaseFieldInfoAlter(&$fields, EntityTypeInterface $entity_t
     if ($entity_type->id() == 'entity_test' && $state->get('entity_test.remove_name_field')) {
       unset($fields['name']);
     }
-    // In 8001 we are assuming that a new definition with multiple cardinality has
-    // been deployed.
+    // In 8001 we are assuming that a new definition with multiple cardinality
+    // has been deployed.
     // @todo Remove this if we end up using state definitions at runtime. See
     //   https://www.drupal.org/node/2554235.
     if ($entity_type->id() == 'entity_test' && $state->get('entity_test.db_updates.entity_definition_updates') == 8001) {
diff --git a/core/modules/views/src/Hook/ViewsHooks.php b/core/modules/views/src/Hook/ViewsHooks.php
index 192fc1cd139c..396c75d95af7 100644
--- a/core/modules/views/src/Hook/ViewsHooks.php
+++ b/core/modules/views/src/Hook/ViewsHooks.php
@@ -175,9 +175,9 @@ public function theme($existing, $type, $theme, $path) : array {
         if (!isset($def['theme']) || empty($def['register_theme'])) {
           continue;
         }
-        // For each theme registration, we have a base directory to check for the
-        // templates folder. This will be relative to the root of the given module
-        // folder, so we always need a module definition.
+        // For each theme registration, we have a base directory to check for
+        // the templates folder. This will be relative to the root of the given
+        // module folder, so we always need a module definition.
         // @todo Watchdog or exception?
         if (!isset($def['provider']) || !$module_handler->moduleExists($def['provider'])) {
           continue;
diff --git a/core/modules/views/src/Plugin/views/PluginBase.php b/core/modules/views/src/Plugin/views/PluginBase.php
index 70c327e116ec..03e09d2c701e 100644
--- a/core/modules/views/src/Plugin/views/PluginBase.php
+++ b/core/modules/views/src/Plugin/views/PluginBase.php
@@ -418,8 +418,8 @@ function ($children, $elements) {
       ];
 
       // Currently you cannot attach assets to tokens with
-      // Renderer::renderInIsolation(). This may be unnecessarily limiting. Consider
-      // using Renderer::executeInRenderContext() instead.
+      // Renderer::renderInIsolation(). This may be unnecessarily limiting.
+      // Consider using Renderer::executeInRenderContext() instead.
       // @todo https://www.drupal.org/node/2566621
       return (string) $this->getRenderer()->renderInIsolation($build);
     }
diff --git a/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php b/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php
index b751abcb5e7d..dacea1a287d1 100644
--- a/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php
@@ -284,6 +284,7 @@ public function testAlterUrl(): void {
       $this->assertSubString(Html::decodeEntities($result), Html::decodeEntities($expected_result));
 
       // @todo The route-based URL generator strips out NULL attributes.
+      // phpcs:ignore
       // $expected_result = Url::fromRoute('entity.node.canonical', ['node' => '123'], ['query' => ['foo' => NULL], 'fragment' => 'bar', 'absolute' => $absolute])->toString();
       $expected_result = Url::fromUserInput('/node/123', ['query' => ['foo' => NULL], 'fragment' => 'bar', 'absolute' => $absolute])->toString();
       $alter['path'] = 'node/123?foo#bar';
diff --git a/core/modules/views/tests/src/Kernel/RenderCacheIntegrationTest.php b/core/modules/views/tests/src/Kernel/RenderCacheIntegrationTest.php
index 7b4c3255913a..8f3bfdbfbeef 100644
--- a/core/modules/views/tests/src/Kernel/RenderCacheIntegrationTest.php
+++ b/core/modules/views/tests/src/Kernel/RenderCacheIntegrationTest.php
@@ -142,6 +142,7 @@ protected function assertCacheTagsForFieldBasedView(bool $do_assert_views_caches
     $build = $this->assertViewsCacheTags($view, $tags_page_2, $do_assert_views_caches, $tags_page_2);
     // @todo Static render arrays don't support different pages yet, see
     //   https://www.drupal.org/node/2500701.
+    // phpcs:ignore
     // $this->assertViewsCacheTagsFromStaticRenderArray($view, $tags_page_2, $do_assert_views_caches);
     $this->assertStringContainsString($random_name, (string) $build['#markup']);
     $view->destroy();
diff --git a/core/modules/views_ui/src/ViewEditForm.php b/core/modules/views_ui/src/ViewEditForm.php
index bc5772830478..98963ce02ad8 100644
--- a/core/modules/views_ui/src/ViewEditForm.php
+++ b/core/modules/views_ui/src/ViewEditForm.php
@@ -120,9 +120,10 @@ public function form(array $form, FormStateInterface $form_state) {
     // stale between page requests.
     // See views_ui_ajax_get_form() for how this affects #ajax.
     // @todo To remove this and allow the form to be cacheable:
-    //   - Change $form_state->get('view') to $form_state->getTemporary()['view'].
-    //   - Add a #process function to initialize $form_state->getTemporary()['view']
-    //     on cached form submissions.
+    //   - Change $form_state->get('view') to
+    //     $form_state->getTemporary()['view'].
+    //   - Add a #process function to initialize
+    //     $form_state->getTemporary()['view'] on cached form submissions.
     //   - Use \Drupal\Core\Form\FormStateInterface::loadInclude().
     $form_state->disableCache();
 
diff --git a/core/modules/views_ui/src/ViewUI.php b/core/modules/views_ui/src/ViewUI.php
index e1b3f71715d5..8f91cf1e8b10 100644
--- a/core/modules/views_ui/src/ViewUI.php
+++ b/core/modules/views_ui/src/ViewUI.php
@@ -600,8 +600,9 @@ public function renderPreview($display_id, $args = []) {
 
       // Suppress contextual links of entities within the result set during a
       // Preview.
-      // @todo We'll want to add contextual links specific to editing the View, so
-      //   the suppression may need to be moved deeper into the Preview pipeline.
+      // @todo We'll want to add contextual links specific to editing the View,
+      //   so the suppression may need to be moved deeper into the Preview
+      //   pipeline.
       views_ui_contextual_links_suppress_push();
 
       $show_additional_queries = $config->get('ui.show.additional_queries');
diff --git a/core/profiles/demo_umami/src/Hook/DemoUmamiHooks.php b/core/profiles/demo_umami/src/Hook/DemoUmamiHooks.php
index bd4f2c7d1afe..54bd1d1454ae 100644
--- a/core/profiles/demo_umami/src/Hook/DemoUmamiHooks.php
+++ b/core/profiles/demo_umami/src/Hook/DemoUmamiHooks.php
@@ -95,8 +95,9 @@ public function installConfigureSubmit(array $form, FormStateInterface $form_sta
   #[Hook('toolbar')]
   public function toolbar(): array {
     // Add a warning about using an experimental profile.
-    // @todo This can be removed once a generic warning for experimental profiles
-    //   has been introduced. https://www.drupal.org/project/drupal/issues/2934374
+    // @todo This can be removed once a generic warning for experimental
+    //   profiles has been introduced in
+    //   https://www.drupal.org/project/drupal/issues/2934374
     $items['experimental-profile-warning'] = [
       '#weight' => 3400,
       '#cache' => [
diff --git a/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php b/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php
index c5443287f995..7cb302ffdbba 100644
--- a/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php
+++ b/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php
@@ -197,13 +197,17 @@ public function testGetAndSet(): void {
     $typed_data = $this->createTypedData(['type' => 'datetime_iso8601'], $value);
     $this->assertInstanceOf(DateTimeInterface::class, $typed_data);
     $this->assertSame($value, $typed_data->getValue(), 'Date value was fetched.');
-    // @todo Uncomment this assertion in https://www.drupal.org/project/drupal/issues/2716891.
+    // @todo Uncomment this assertion in
+    //   https://www.drupal.org/project/drupal/issues/2716891.
+    // phpcs:ignore
     // $this->assertEquals($typed_data->getDateTime()->format('c'), $typed_data->getValue(), 'Value representation of a date is ISO 8601');
     $this->assertSame('UTC', $typed_data->getDateTime()->getTimezone()->getName());
     $this->assertEquals(0, $typed_data->validate()->count());
     $new_value = '2014-01-02T20:00';
     $typed_data->setValue($new_value);
-    // @todo Uncomment this assertion in https://www.drupal.org/project/drupal/issues/2716891.
+    // @todo Uncomment this assertion in
+    //   https://www.drupal.org/project/drupal/issues/2716891.
+    // phpcs:ignore
     // $this->assertTrue($typed_data->getDateTime()->format('c') === $new_value, 'Date value was changed and set by an ISO8601 date.');
     $this->assertEquals(0, $typed_data->validate()->count());
     $this->assertSame('2014-01-02', $typed_data->getDateTime()->format('Y-m-d'), 'Date value was changed and set by date string.');
-- 
GitLab