diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index fd3958d4af18bc40dce850a56f9ceb0942737923..f520a643420c4bac19bdab435eee160fd30ce59d 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -1932,7 +1932,7 @@ function install_check_translations($langcode, $server_pattern) { $readable = FALSE; $writable = FALSE; - // @todo: Make this configurable. + // @todo Make this configurable. $site_path = \Drupal::getContainer()->getParameter('site.path'); $files_directory = $site_path . '/files'; $translations_directory = $site_path . '/files/translations'; diff --git a/core/includes/update.inc b/core/includes/update.inc index ae13309396aaf0e16a269894d9b564d65e11f462..d671a09f00bfc28ae56dc804e09cf16aada42d77 100644 --- a/core/includes/update.inc +++ b/core/includes/update.inc @@ -65,7 +65,7 @@ function update_check_requirements() { * system would detect and attempt to run all historical updates for a * module. * - * @todo: remove in a major version after + * @todo remove in a major version after * https://www.drupal.org/project/drupal/issues/3130037 has been fixed. */ function _update_fix_missing_schema() { @@ -171,7 +171,7 @@ function update_do_one($module, $number, $dependency_map, &$context) { $ret['results']['query'] = $function($context['sandbox']); $ret['results']['success'] = TRUE; } - // @TODO We may want to do different error handling for different + // @todo We may want to do different error handling for different // exception types, but for now we'll just log the exception and // return the message for printing. // @see https://www.drupal.org/node/2564311 @@ -240,7 +240,7 @@ function update_invoke_post_update($function, &$context) { \Drupal::service('update.post_update_registry')->registerInvokedUpdates([$function]); } } - // @TODO We may want to do different error handling for different exception + // @todo We may want to do different error handling for different exception // types, but for now we'll just log the exception and return the message // for printing. // @see https://www.drupal.org/node/2564311 diff --git a/core/lib/Drupal/Component/Gettext/PoItem.php b/core/lib/Drupal/Component/Gettext/PoItem.php index 44736fcd11025daad5d38ce76151e98115cf03f3..9aa26cc5bfc182450850ba8916f4d3a3ecc75741 100644 --- a/core/lib/Drupal/Component/Gettext/PoItem.php +++ b/core/lib/Drupal/Component/Gettext/PoItem.php @@ -5,7 +5,7 @@ /** * PoItem handles one translation. * - * @todo: This class contains some really old legacy code. + * @todo This class contains some really old legacy code. * @see https://www.drupal.org/node/1637662 */ class PoItem { diff --git a/core/lib/Drupal/Core/Asset/AssetResolver.php b/core/lib/Drupal/Core/Asset/AssetResolver.php index e21fddf91a87eb2fef2883b4a3d62d4bf402a888..fcd294a649714d4ed7fc191060ce044bf266eb01 100644 --- a/core/lib/Drupal/Core/Asset/AssetResolver.php +++ b/core/lib/Drupal/Core/Asset/AssetResolver.php @@ -107,7 +107,7 @@ protected function getLibrariesToLoad(AttachedAssetsInterface $assets) { // representative set before then expanding the list to include all // dependencies. // @see Drupal\FunctionalTests\Core\Asset\AssetOptimizationTestUmami - // @todo: https://www.drupal.org/project/drupal/issues/1945262 + // @todo https://www.drupal.org/project/drupal/issues/1945262 $libraries = $assets->getLibraries(); if ($libraries) { $libraries = $this->libraryDependencyResolver->getMinimalRepresentativeSubset($libraries); diff --git a/core/lib/Drupal/Core/Database/Connection.php b/core/lib/Drupal/Core/Database/Connection.php index b05980698b508dcbd83ad0079e64ba4315f0c656..5da12f964f6889191ade2db99253b245e95a7679 100644 --- a/core/lib/Drupal/Core/Database/Connection.php +++ b/core/lib/Drupal/Core/Database/Connection.php @@ -1607,8 +1607,8 @@ public static function removeDatabaseEntriesFromDebugBacktrace(array $backtrace, * The debug backtrace. */ protected function getDebugBacktrace(): array { - // @todo: allow a backtrace including all arguments as an option. - // See https://www.drupal.org/project/drupal/issues/3401906 + // @todo Allow a backtrace including all arguments as an option. + // https://www.drupal.org/project/drupal/issues/3401906 return debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); } diff --git a/core/lib/Drupal/Core/Database/Query/Select.php b/core/lib/Drupal/Core/Database/Query/Select.php index ad29bbf5056186e12fb98dcf195bb73f28db9674..290cbbf487c960815b094874e433043e58430085 100644 --- a/core/lib/Drupal/Core/Database/Query/Select.php +++ b/core/lib/Drupal/Core/Database/Query/Select.php @@ -475,10 +475,9 @@ public function preExecute(?SelectInterface $query = NULL) { // taxonomy_term_access to its queries. Provide backwards compatibility // by adding both tags here instead of attempting to fix all contrib // modules in a coordinated effort. - // TODO: - // - Extract this mechanism into a hook as part of a public (non-security) - // issue. - // - Emit E_USER_DEPRECATED if term_access is used. + // @todo Extract this mechanism into a hook as part of a public + // (non-security) issue. + // @todo Emit E_USER_DEPRECATED if term_access is used. // https://www.drupal.org/node/2575081 $term_access_tags = ['term_access' => 1, 'taxonomy_term_access' => 1]; if (array_intersect_key($this->alterTags, $term_access_tags)) { diff --git a/core/lib/Drupal/Core/Display/Annotation/DisplayVariant.php b/core/lib/Drupal/Core/Display/Annotation/DisplayVariant.php index 28d75b5e4af80a863b2bd6766537d2ee480f52d6..e05ba219ec304190855a5bff607ddedb099cd7f1 100644 --- a/core/lib/Drupal/Core/Display/Annotation/DisplayVariant.php +++ b/core/lib/Drupal/Core/Display/Annotation/DisplayVariant.php @@ -15,7 +15,7 @@ * either load its own data or be injected with data from another Display * object. * - * @todo: Revise description when/if Displays are added to core: + * @todo Revise description when/if Displays are added to core. * https://www.drupal.org/node/2292733 * * Plugin namespace: Plugin\DisplayVariant diff --git a/core/lib/Drupal/Core/Entity/ContentEntityBase.php b/core/lib/Drupal/Core/Entity/ContentEntityBase.php index cbb7896cc09c274f73504c4c5b08599fce6f708e..52c1b9bf81e6061b2e2cad3c1b4620a2980713f6 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityBase.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityBase.php @@ -31,9 +31,9 @@ abstract class ContentEntityBase extends EntityBase implements \IteratorAggregat * are keyed by language code, whereas LanguageInterface::LANGCODE_DEFAULT * is used for values in default language. * - * @todo: Add methods for getting original fields and for determining + * @todo Add methods for getting original fields and for determining * changes. - * @todo: Provide a better way for defining default values. + * @todo Provide a better way for defining default values. * * @var array */ @@ -208,7 +208,7 @@ public function __construct(array $values, $entity_type, $bundle = FALSE, $trans foreach ($values as $key => $value) { // If the key matches an existing property set the value to the property // to set properties like isDefaultRevision. - // @todo: Should this be converted somehow? + // @todo Should this be converted somehow? if (property_exists($this, $key) && isset($value[LanguageInterface::LANGCODE_DEFAULT])) { $this->$key = $value[LanguageInterface::LANGCODE_DEFAULT]; } @@ -1070,7 +1070,7 @@ public function updateOriginalValues() { /** * Implements the magic method for getting object properties. * - * @todo: A lot of code still uses non-fields (e.g. $entity->content in view + * @todo A lot of code still uses non-fields (e.g. $entity->content in view * builders) by reference. Clean that up. */ public function &__get($name) { diff --git a/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php b/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php index 05100921fc45c69a5809c1e48c8626c69a26cd44..17dcac0a90e9ba1132cf4a4ab685fed40bfe1a5a 100644 --- a/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php +++ b/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php @@ -221,7 +221,7 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta $columns = $field_definition->getFieldStorageDefinition()->getColumns(); // If there is more than one column, display them all, otherwise just // display the field label. - // @todo: Use property labels instead of the column name. + // @todo Use property labels instead of the column name. if (count($columns) > 1) { foreach ($columns as $column_name => $column_info) { $fields[$field_name . '.' . $column_name] = $this->t('@label (@column)', ['@label' => $field_definition->getLabel(), '@column' => $column_name]); diff --git a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php index 6d383ce3f518b95e61accb2bcf28af11ff7bb8ec..93029c399df3cc9bc2dfbf3b3b7ddf8a917df9b7 100644 --- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php +++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php @@ -1675,8 +1675,8 @@ protected function readFieldItemsToPurge(FieldDefinitionInterface $field_definit if (!isset($entities[$item_row['revision_id']])) { // Create entity with the right revision id and entity id combination. $item_row['entity_type'] = $this->entityTypeId; - // @todo: Replace this by an entity object created via an entity - // factory, see https://www.drupal.org/node/1867228. + // @todo Replace this by an entity object created via an entity + // factory. https://www.drupal.org/node/1867228. $entities[$item_row['revision_id']] = _field_create_entity_from_ids((object) $item_row); } $item = []; diff --git a/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php b/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php index dc537b6b4534af469995a61d270259d10e5ad6b5..0bf4966dd9ffc2c3753df0001db8630bb2744891 100644 --- a/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php +++ b/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php @@ -75,7 +75,7 @@ public function getPropertyDefinitions() { $this->propertyDefinitions = []; } else { - // @todo: Add support for handling multiple bundles. + // @todo Add support for handling multiple bundles. // See https://www.drupal.org/node/2169813. $bundles = $this->getBundles(); if (is_array($bundles) && count($bundles) == 1) { diff --git a/core/lib/Drupal/Core/Executable/ExecutablePluginBase.php b/core/lib/Drupal/Core/Executable/ExecutablePluginBase.php index c9632a1d5c3d4829ded3b07e932060fce63893b8..88c0b53ac061364bd65b4a77aedc6c421de188db 100644 --- a/core/lib/Drupal/Core/Executable/ExecutablePluginBase.php +++ b/core/lib/Drupal/Core/Executable/ExecutablePluginBase.php @@ -18,7 +18,7 @@ abstract class ExecutablePluginBase extends PluginBase implements ExecutableInte /** * Gets an array of definitions of available configuration options. * - * @todo: This needs to go into an interface. + * @todo This needs to go into an interface. * * @return \Drupal\Core\TypedData\DataDefinitionInterface[] * An array of typed data definitions describing available configuration @@ -38,7 +38,7 @@ public function getConfigDefinitions() { * @param string $key * The key of the configuration option to get. * - * @todo: This needs to go into an interface. + * @todo This needs to go into an interface. * * @return \Drupal\Core\TypedData\DataDefinitionInterface|false * The typed data definition describing the configuration option, or FALSE @@ -55,7 +55,7 @@ public function getConfigDefinition($key) { /** * Gets all configuration values. * - * @todo: This needs to go into an interface. + * @todo This needs to go into an interface. * * @return array * The array of all configuration values, keyed by configuration option diff --git a/core/lib/Drupal/Core/Field/BaseFieldDefinition.php b/core/lib/Drupal/Core/Field/BaseFieldDefinition.php index 811c81edb19f71ed6b759fad3aaf7140cb31fb53..db28151449f50f00dbd6db980c07ff1b43cfde24 100644 --- a/core/lib/Drupal/Core/Field/BaseFieldDefinition.php +++ b/core/lib/Drupal/Core/Field/BaseFieldDefinition.php @@ -256,7 +256,7 @@ public function setRevisionable($revisionable) { * {@inheritdoc} */ public function getCardinality() { - // @todo: Allow to control this. + // @todo Allow to control this. return $this->definition['cardinality'] ?? 1; } @@ -565,8 +565,8 @@ public function getOptionsProvider($property_name, FieldableEntityInterface $ent $items = $entity->get($this->getName()); return \Drupal::service('plugin.manager.field.field_type')->createFieldItem($items, 0); } - // @todo: Allow setting custom options provider, see - // https://www.drupal.org/node/2002138. + // @todo Allow setting custom options provider. + // https://www.drupal.org/node/2002138 } /** diff --git a/core/lib/Drupal/Core/KeyValueStore/DatabaseStorage.php b/core/lib/Drupal/Core/KeyValueStore/DatabaseStorage.php index 48f609978900ab2e3fb1c24ab8f9ac8dd302f550..9b942d72a2a4d03ba0e0815e827c8e3a60bb1607 100644 --- a/core/lib/Drupal/Core/KeyValueStore/DatabaseStorage.php +++ b/core/lib/Drupal/Core/KeyValueStore/DatabaseStorage.php @@ -88,7 +88,7 @@ public function getMultiple(array $keys) { } } catch (\Exception $e) { - // @todo: Perhaps if the database is never going to be available, + // @todo Perhaps if the database is never going to be available, // key/value requests should return FALSE in order to allow exception // handling to occur but for now, keep it an array, always. } diff --git a/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php b/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php index fa62689a257db3889332584b7fad42dd839d7c51..34f94c0abffd3e9f1df91e26277b6d03799c12f0 100644 --- a/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php +++ b/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php @@ -70,7 +70,7 @@ public function getMultiple(array $keys) { return array_map([$this->serializer, 'decode'], $values); } catch (\Exception $e) { - // @todo: Perhaps if the database is never going to be available, + // @todo Perhaps if the database is never going to be available, // key/value requests should return FALSE in order to allow exception // handling to occur but for now, keep it an array, always. // https://www.drupal.org/node/2787737 diff --git a/core/lib/Drupal/Core/Menu/LocalActionManager.php b/core/lib/Drupal/Core/Menu/LocalActionManager.php index cfd3b55d96463a73e0c63a9d27b4182a00ab0802..32870e6c8b750be309dfe9c365070ba3b7006e67 100644 --- a/core/lib/Drupal/Core/Menu/LocalActionManager.php +++ b/core/lib/Drupal/Core/Menu/LocalActionManager.php @@ -169,7 +169,7 @@ public function getActionsForRoute($route_appears) { if (!isset($this->instances[$route_appears])) { $route_names = []; $this->instances[$route_appears] = []; - // @todo - optimize this lookup by compiling or caching. + // @todo Optimize this lookup by compiling or caching. foreach ($this->getDefinitions() as $plugin_id => $action_info) { if (in_array($route_appears, $action_info['appears_on'])) { $plugin = $this->createInstance($plugin_id); diff --git a/core/lib/Drupal/Core/Menu/LocalTaskManager.php b/core/lib/Drupal/Core/Menu/LocalTaskManager.php index 6fb8bdfe935b5b86d373bf6dc7870a25941e968a..2655f2dd612c9cc469ee3312d8eeb59e183c15bb 100644 --- a/core/lib/Drupal/Core/Menu/LocalTaskManager.php +++ b/core/lib/Drupal/Core/Menu/LocalTaskManager.php @@ -223,8 +223,8 @@ public function getLocalTasksForRoute($route_name) { } // Tabs that link to the current route are viable parents // and their parent and children should be visible also. - // @todo - this only works for 2 levels of tabs. - // instead need to iterate up. + // @todo This only works for 2 levels of tabs instead + // need to iterate up. $parents[$plugin_id] = TRUE; if (!empty($task_info['parent_id'])) { $parents[$task_info['parent_id']] = TRUE; diff --git a/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php b/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php index f95108a93159f4cf9f0ea915599dd89da77a23ea..e5f5fcf4323aca93864578e1354b893296decc16 100644 --- a/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php +++ b/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php @@ -103,7 +103,7 @@ public function doTrustedCallback(callable $callback, array $args, $message, $er } } - // @TODO Allow named arguments in https://www.drupal.org/node/3174150 + // @todo Allow named arguments in https://www.drupal.org/node/3174150 return call_user_func_array($callback, array_values($args)); } diff --git a/core/lib/Drupal/Core/Session/SessionManager.php b/core/lib/Drupal/Core/Session/SessionManager.php index 3f5e261d3a6479aa1ce346636a2f0aa13a1df1b5..8b43dfb21b04cf5d926c8b851c522877b38fbf64 100644 --- a/core/lib/Drupal/Core/Session/SessionManager.php +++ b/core/lib/Drupal/Core/Session/SessionManager.php @@ -17,8 +17,7 @@ * storing and retrieving session data has been extracted from it in Symfony 2.1 * but the class name was not changed. * - * @todo - * In fact the NativeSessionStorage class already implements all of the + * @todo In fact the NativeSessionStorage class already implements all of the * functionality required by a typical Symfony application. Normally it is not * necessary to subclass it at all. In order to reach the point where Drupal * can use the Symfony session management unmodified, the code implemented @@ -39,7 +38,7 @@ class SessionManager extends NativeSessionStorage implements SessionManagerInter /** * The write safe session handler. * - * @todo: This reference should be removed once all database queries + * @todo This reference should be removed once all database queries * are removed from the session manager class. * * @var \Drupal\Core\Session\WriteSafeSessionHandlerInterface diff --git a/core/lib/Drupal/Core/Session/SessionManagerInterface.php b/core/lib/Drupal/Core/Session/SessionManagerInterface.php index 9e65618f970814a47c74a571cb68ee935a4bac33..700f114f08b332cff20ecb57e699e6fe3a3b6c76 100644 --- a/core/lib/Drupal/Core/Session/SessionManagerInterface.php +++ b/core/lib/Drupal/Core/Session/SessionManagerInterface.php @@ -25,7 +25,7 @@ public function destroy(); /** * Sets the write safe session handler. * - * @todo: This should be removed once all database queries are removed from + * @todo This should be removed once all database queries are removed from * the session manager class. * * @var \Drupal\Core\Session\WriteSafeSessionHandlerInterface diff --git a/core/lib/Drupal/Core/Session/UserSession.php b/core/lib/Drupal/Core/Session/UserSession.php index 1816ca3a1cecab3311aed9435578e38fc2cb0877..30f5f3e9bcdae856281f1a8b5d070940a28a9a16 100644 --- a/core/lib/Drupal/Core/Session/UserSession.php +++ b/core/lib/Drupal/Core/Session/UserSession.php @@ -5,7 +5,7 @@ /** * An implementation of the user account interface for the global user. * - * @todo: Change all properties to protected. + * @todo Change all properties to protected. */ #[\AllowDynamicProperties] class UserSession implements AccountInterface { diff --git a/core/lib/Drupal/Core/TypedData/DataDefinition.php b/core/lib/Drupal/Core/TypedData/DataDefinition.php index 6778aee292c48054215e05891bb26db103b3ba3e..3ad36584736821e6a83b6853079b52cbd538248a 100644 --- a/core/lib/Drupal/Core/TypedData/DataDefinition.php +++ b/core/lib/Drupal/Core/TypedData/DataDefinition.php @@ -312,7 +312,7 @@ public function addConstraint($constraint_name, $options = NULL) { * {@inheritdoc} * * This is for BC support only. - * @todo: Remove in https://www.drupal.org/node/1928868. + * @todo Remove in https://www.drupal.org/node/1928868. */ public function offsetExists($offset): bool { // PHP's array access does not work correctly with isset(), so we have to @@ -324,7 +324,7 @@ public function offsetExists($offset): bool { * {@inheritdoc} * * This is for BC support only. - * @todo: Remove in https://www.drupal.org/node/1928868. + * @todo Remove in https://www.drupal.org/node/1928868. */ public function &offsetGet($offset): mixed { if (!isset($this->definition[$offset])) { @@ -337,7 +337,7 @@ public function &offsetGet($offset): mixed { * {@inheritdoc} * * This is for BC support only. - * @todo: Remove in https://www.drupal.org/node/1928868. + * @todo Remove in https://www.drupal.org/node/1928868. */ public function offsetSet($offset, $value): void { $this->definition[$offset] = $value; @@ -347,7 +347,7 @@ public function offsetSet($offset, $value): void { * {@inheritdoc} * * This is for BC support only. - * @todo: Remove in https://www.drupal.org/node/1928868. + * @todo Remove in https://www.drupal.org/node/1928868. */ public function offsetUnset($offset): void { unset($this->definition[$offset]); diff --git a/core/lib/Drupal/Core/TypedData/Plugin/DataType/DurationIso8601.php b/core/lib/Drupal/Core/TypedData/Plugin/DataType/DurationIso8601.php index ce5a7cc4dfa0868ca63ba2a610bb33f6c0772c14..50a5201a6aa2619ee6dbb32160cfcc7853649590 100644 --- a/core/lib/Drupal/Core/TypedData/Plugin/DataType/DurationIso8601.php +++ b/core/lib/Drupal/Core/TypedData/Plugin/DataType/DurationIso8601.php @@ -22,7 +22,7 @@ class DurationIso8601 extends StringData implements DurationInterface { */ public function getDuration() { if ($this->value) { - // @todo: Add support for negative intervals on top of the DateInterval + // @todo Add support for negative intervals on top of the DateInterval // constructor. return new \DateInterval($this->value); } diff --git a/core/lib/Drupal/Core/Utility/ThemeRegistry.php b/core/lib/Drupal/Core/Utility/ThemeRegistry.php index 6deae02cbe687cd28efe0fd4d3db4d69ee881a68..bfbb5b4a2326a413135d5b9188c7cb4fe6a92cad 100644 --- a/core/lib/Drupal/Core/Utility/ThemeRegistry.php +++ b/core/lib/Drupal/Core/Utility/ThemeRegistry.php @@ -55,7 +55,7 @@ public function __construct($cid, CacheBackendInterface $cache, LockBackendInter $this->tags = $tags; $this->persistable = $modules_loaded && \Drupal::hasRequest() && \Drupal::request()->isMethod('GET'); - // @todo: Implement lazy-loading. + // @todo Implement lazy-loading. $this->cacheLoaded = TRUE; if ($this->persistable && $cached = $this->cache->get($this->cid)) { @@ -137,7 +137,7 @@ protected function updateCache($lock = TRUE) { if (!$this->persistable) { return; } - // @todo: Is the custom implementation necessary? + // @todo Is the custom implementation necessary? $data = []; foreach ($this->keysToPersist as $offset => $persist) { if ($persist) { diff --git a/core/lib/Drupal/Core/Validation/ConstraintValidatorFactory.php b/core/lib/Drupal/Core/Validation/ConstraintValidatorFactory.php index 8960dd573d4394516eeae54c51c3e09b2e8a9994..1a56ddd16d3e2040eb9a2da88f6f362c688e4ef0 100644 --- a/core/lib/Drupal/Core/Validation/ConstraintValidatorFactory.php +++ b/core/lib/Drupal/Core/Validation/ConstraintValidatorFactory.php @@ -10,7 +10,7 @@ /** * Defines a constraint validator factory that works with container injection. * - * @TODO Decide what to do with this class or how to reuse constraint + * @todo Decide what to do with this class or how to reuse constraint * validators in https://drupal.org/project/drupal/issues/3097071 */ class ConstraintValidatorFactory extends BaseConstraintValidatorFactory { diff --git a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/LengthConstraint.php b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/LengthConstraint.php index 30928bd09e67717b3ef8c9806dba05ff0a7a5e7d..021603c7e8269f3ce74ac3460a34bd02c7d749a7 100644 --- a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/LengthConstraint.php +++ b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/LengthConstraint.php @@ -11,7 +11,7 @@ * * Overrides the symfony constraint to use Drupal-style replacement patterns. * - * @todo: Move this below the TypedData core component. + * @todo Move this below the TypedData core component. */ #[Constraint( id: 'Length', diff --git a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraintValidator.php b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraintValidator.php index 501d2fd7aa448a60a063b2540cd490d40bfbd0f3..2da346aced47808df57320cce37437cf1bde0101 100644 --- a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraintValidator.php +++ b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraintValidator.php @@ -60,7 +60,7 @@ public function validate($value, Constraint $constraint): void { if ($typed_data instanceof UriInterface && in_array(parse_url($value, PHP_URL_SCHEME), [NULL, FALSE], TRUE)) { $valid = FALSE; } - // @todo: Move those to separate constraint validators. + // @todo Move those to separate constraint validators. try { if ($typed_data instanceof DateTimeInterface && $typed_data->getDateTime() && $typed_data->getDateTime()->hasErrors()) { $valid = FALSE; @@ -75,7 +75,7 @@ public function validate($value, Constraint $constraint): void { } if (!$valid) { - // @todo: Provide a good violation message for each problem. + // @todo Provide a good violation message for each problem. $this->context->addViolation($constraint->message, [ '%value' => is_object($value) ? get_class($value) : (is_array($value) ? 'Array' : (string) $value), ]); diff --git a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/RangeConstraint.php b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/RangeConstraint.php index 86fa440ec8e535141e1c58697c5b9ea29702d5cb..8a18df076c580bf20eee063d5a62586c32cef4f8 100644 --- a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/RangeConstraint.php +++ b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/RangeConstraint.php @@ -11,7 +11,7 @@ * * Overrides the symfony constraint to use Drupal-style replacement patterns. * - * @todo: Move this below the TypedData core component. + * @todo Move this below the TypedData core component. */ #[Constraint( id: 'Range', diff --git a/core/modules/ban/tests/src/Functional/IpAddressBlockingTest.php b/core/modules/ban/tests/src/Functional/IpAddressBlockingTest.php index 6c72b0dae8efb1371d09deec0c683e01b01f075c..ee1aeb29f0a62fd51a15dd3bd53f2cbe18c59e4d 100644 --- a/core/modules/ban/tests/src/Functional/IpAddressBlockingTest.php +++ b/core/modules/ban/tests/src/Functional/IpAddressBlockingTest.php @@ -84,7 +84,7 @@ public function testIPAddressValidation() { // Submit your own IP address. This fails, although it works when testing // manually. - // TODO: On some systems this test fails due to a bug/inconsistency in cURL. + // @todo On some systems this test fails due to a bug/inconsistency in cURL. // $edit = array(); // $edit['ip'] = \Drupal::request()->getClientIP(); // $this->drupalGet('admin/config/people/ban'); diff --git a/core/modules/block/tests/src/Traits/BlockCreationTrait.php b/core/modules/block/tests/src/Traits/BlockCreationTrait.php index e94767409893dd24a223f9c1092996b74b400c12..9420a2bb2ca116d417344d8dbe6180f5ace0c10c 100644 --- a/core/modules/block/tests/src/Traits/BlockCreationTrait.php +++ b/core/modules/block/tests/src/Traits/BlockCreationTrait.php @@ -37,8 +37,7 @@ trait BlockCreationTrait { * @return \Drupal\block\Entity\Block * The block entity. * - * @todo - * Add support for creating content block instances. + * @todo Add support for creating content block instances. */ protected function placeBlock($plugin_id, array $settings = []) { $config = \Drupal::configFactory(); diff --git a/core/modules/comment/src/Controller/CommentController.php b/core/modules/comment/src/Controller/CommentController.php index 6f9a0f9f1533300a89f1123644556a3d65dbf0e0..4dfa517a7b126f97220df3977e2ddd4144f66f15 100644 --- a/core/modules/comment/src/Controller/CommentController.php +++ b/core/modules/comment/src/Controller/CommentController.php @@ -127,7 +127,7 @@ public function commentPermalink(Request $request, CommentInterface $comment) { // Find the current display page for this comment. $page = $this->entityTypeManager()->getStorage('comment')->getDisplayOrdinal($comment, $field_definition->getSetting('default_mode'), $field_definition->getSetting('per_page')); - // @todo: Cleaner sub request handling. + // @todo Cleaner sub request handling. $subrequest_url = $entity->toUrl()->setOption('query', ['page' => $page])->toString(TRUE); $redirect_request = Request::create($subrequest_url->getGeneratedUrl(), 'GET', $request->query->all(), $request->cookies->all(), [], $request->server->all()); // Carry over the session to the subrequest. diff --git a/core/modules/comment/src/Plugin/views/wizard/Comment.php b/core/modules/comment/src/Plugin/views/wizard/Comment.php index 3e662475b401b77b62548b9239c5dad37bb7de78..2dbd119beea97bc745f9cd24870e325bda72bc78 100644 --- a/core/modules/comment/src/Plugin/views/wizard/Comment.php +++ b/core/modules/comment/src/Plugin/views/wizard/Comment.php @@ -7,7 +7,7 @@ use Drupal\views\Plugin\views\wizard\WizardPluginBase; /** - * @todo: replace numbers with constants. + * @todo replace numbers with constants. */ /** diff --git a/core/modules/config/tests/config_test/src/ConfigTestStorage.php b/core/modules/config/tests/config_test/src/ConfigTestStorage.php index e705715273d5b967986ca0b3a6eeceb768ba0a08..c494d2cd1b28a18e5a47c5dc56c61c8276569102 100644 --- a/core/modules/config/tests/config_test/src/ConfigTestStorage.php +++ b/core/modules/config/tests/config_test/src/ConfigTestStorage.php @@ -5,9 +5,6 @@ use Drupal\Core\Config\Entity\ConfigEntityStorage; use Drupal\Core\Config\Config; -/** - * @todo. - */ class ConfigTestStorage extends ConfigEntityStorage { /** diff --git a/core/modules/contact/tests/src/Functional/ContactSitewideTest.php b/core/modules/contact/tests/src/Functional/ContactSitewideTest.php index 4b70da6490bc8d728de06a33d10ef64c0b17e07f..378ee9284c67f52e2a440f34e187f58a42457b89 100644 --- a/core/modules/contact/tests/src/Functional/ContactSitewideTest.php +++ b/core/modules/contact/tests/src/Functional/ContactSitewideTest.php @@ -118,7 +118,7 @@ public function testSiteWideContact() { // User form could not be changed or deleted. // Cannot use ::assertNoLinkByHref as it does partial URL matching and with // field_ui enabled admin/structure/contact/manage/personal/fields exists. - // @todo: See https://www.drupal.org/node/2031223 for the above. + // @todo See https://www.drupal.org/node/2031223 for the above. $url = Url::fromRoute('entity.contact_form.edit_form', ['contact_form' => 'personal'])->toString(); $this->assertSession()->elementNotExists('xpath', "//a[@href='{$url}']"); $this->assertSession()->linkByHrefNotExists('admin/structure/contact/manage/personal/delete'); diff --git a/core/modules/content_moderation/content_moderation.module b/core/modules/content_moderation/content_moderation.module index df332c35c47863c89e9df7fd194c016143ff6e7c..71bb1025398034d02d4dcd48e883e037ddd5ce42 100644 --- a/core/modules/content_moderation/content_moderation.module +++ b/core/modules/content_moderation/content_moderation.module @@ -373,8 +373,8 @@ function content_moderation_workflow_update(WorkflowInterface $entity) { * Implements hook_views_post_execute(). */ function content_moderation_views_post_execute(ViewExecutable $view) { - // @todo, remove this once broken handlers in views configuration result in - // a view no longer returning results. https://www.drupal.org/node/2907954. + // @todo Remove this once broken handlers in views configuration result in + // a view no longer returning results. https://www.drupal.org/node/2907954. foreach ($view->filter as $id => $filter) { if (str_starts_with($id, 'moderation_state') && $filter instanceof Broken) { $view->result = []; diff --git a/core/modules/editor/editor.module b/core/modules/editor/editor.module index b4a72ce05d1ef28afcf08d65d725c19b3f17c40d..3fdebe824b305a8dc02ce4e2d51033b90d1372be 100644 --- a/core/modules/editor/editor.module +++ b/core/modules/editor/editor.module @@ -593,7 +593,7 @@ function _editor_get_formatted_text_fields(FieldableEntityInterface $entity) { } // Only return formatted text fields. - // @todo: improve as part of https://www.drupal.org/node/2732429 + // @todo improve as part of https://www.drupal.org/node/2732429 $field_type_manager = \Drupal::service('plugin.manager.field.field_type'); return array_keys(array_filter($field_definitions, function (FieldDefinitionInterface $definition) use ($field_type_manager) { $type = $definition->getType(); diff --git a/core/modules/field/src/Entity/FieldStorageConfig.php b/core/modules/field/src/Entity/FieldStorageConfig.php index bbd9a0737141a4cb8f057c01d6b01f77d68824fc..4afd420822e6052507236604a4df0bf0579de46b 100644 --- a/core/modules/field/src/Entity/FieldStorageConfig.php +++ b/core/modules/field/src/Entity/FieldStorageConfig.php @@ -700,8 +700,8 @@ public function getOptionsProvider($property_name, FieldableEntityInterface $ent } return \Drupal::service('plugin.manager.field.field_type')->createFieldItem($items, 0); } - // @todo: Allow setting custom options provider, see - // https://www.drupal.org/node/2002138. + // @todo Allow setting custom options provider. + // https://www.drupal.org/node/2002138. } /** diff --git a/core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceDefaults.php b/core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceDefaults.php index f18fae6af736db30e7c17bc86f319a8a046f7e9a..ac8f547bf8bfef4658e9156b96b99bb9b03428b4 100644 --- a/core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceDefaults.php +++ b/core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceDefaults.php @@ -34,7 +34,7 @@ public function transform($value, MigrateExecutableInterface $migrate_executable break; case 'imagefield_widget': - // @todo, load the image and populate the defaults. + // @todo load the image and populate the defaults. // $default['default_image'] = $widget_settings['default_image']; break; diff --git a/core/modules/field/tests/src/Functional/FormTest.php b/core/modules/field/tests/src/Functional/FormTest.php index c637c728756ccc9ac6e9e1eda9d3f2b1a88a240c..aed41e76c27ec89470f679f22b17358446d5d27b 100644 --- a/core/modules/field/tests/src/Functional/FormTest.php +++ b/core/modules/field/tests/src/Functional/FormTest.php @@ -147,7 +147,7 @@ public function testFieldFormSingle() { ]; $this->submitForm($edit, 'Save'); $this->assertSession()->pageTextContains("{$this->field['label']} does not accept the value -1."); - // TODO : check that the correct field is flagged for error. + // @todo check that the correct field is flagged for error. // Create an entity $value = mt_rand(1, 127); @@ -296,7 +296,7 @@ public function testFieldFormUnlimited() { $this->assertSession()->fieldValueEquals("{$field_name}[1][value]", ''); // Verify that no extraneous widget is displayed. $this->assertSession()->fieldNotExists("{$field_name}[2][value]"); - // TODO : check that non-field inputs are preserved ('title'), etc. + // @todo check that non-field inputs are preserved ('title'), etc. // Yet another time so that we can play with more values -> 3 widgets. $this->submitForm([], 'Add another item'); diff --git a/core/modules/field/tests/src/Kernel/FieldAttachOtherTest.php b/core/modules/field/tests/src/Kernel/FieldAttachOtherTest.php index 154fafdf5180df8a8b75a4d98fb7728930006489..e68d874f61790ba88eb9d9d1540d27c580d4d77c 100644 --- a/core/modules/field/tests/src/Kernel/FieldAttachOtherTest.php +++ b/core/modules/field/tests/src/Kernel/FieldAttachOtherTest.php @@ -131,8 +131,7 @@ public function testEntityDisplayBuild() { $this->assertRaw($expected, "Value $delta is displayed, formatter settings are applied."); } - // TODO: - // - check display order with several fields + // @todo Check display order with several fields. } /** diff --git a/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php b/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php index 1285481f41a51db4ca48470809b3ea9549bccc87..1bb91b4aabfe2a42a817e19afed7a5aba89a51d4 100644 --- a/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php +++ b/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php @@ -34,7 +34,7 @@ public function testFieldAttachSaveLoad() { $this->createFieldWithStorage('', $entity_type); $cardinality = $this->fieldTestData->field_storage->getCardinality(); - // TODO : test empty values filtering and "compression" (store consecutive deltas). + // @todo Test empty values filtering and "compression" (store consecutive deltas). // Preparation: create three revisions and store them in $revision array. $values = []; $entity = $this->container->get('entity_type.manager') diff --git a/core/modules/field/tests/src/Kernel/FieldCrudTest.php b/core/modules/field/tests/src/Kernel/FieldCrudTest.php index cdc2b6ad7fee0f878d5ef4b2c2086fc0b8873d66..e95f8c56468b056c1b305659cefd6b44b65b4a5b 100644 --- a/core/modules/field/tests/src/Kernel/FieldCrudTest.php +++ b/core/modules/field/tests/src/Kernel/FieldCrudTest.php @@ -60,7 +60,7 @@ protected function setUp(): void { ]; } - // TODO : test creation with + // @todo Test creation with // - a full fledged $field structure, check that all the values are there // - a minimal $field structure, check all default values are set // defer actual $field comparison to a helper function, used for the two cases above, @@ -121,7 +121,7 @@ public function testCreateField() { // Expected exception; just continue testing. } - // TODO: test other failures. + // @todo Test other failures. } /** @@ -269,7 +269,7 @@ public function testUpdateField() { $this->assertEquals($field->getLabel(), $field_new->getLabel(), '"label" change is saved'); $this->assertEquals($field->getDescription(), $field_new->getDescription(), '"description" change is saved'); - // TODO: test failures. + // @todo Test failures. } /** diff --git a/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php b/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php index 55f592304c59a0fdbfe520b82425c163956c6be7..ce9900e248dbe40f3b99de62b607cbe69c896aeb 100644 --- a/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php +++ b/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php @@ -26,7 +26,7 @@ class FieldStorageCrudTest extends FieldKernelTestBase { */ protected static $modules = []; - // TODO : test creation with + // @todo Test creation with // - a full fledged $field structure, check that all the values are there // - a minimal $field structure, check all default values are set // defer actual $field comparison to a helper function, used for the two cases above diff --git a/core/modules/file/src/FileViewsData.php b/core/modules/file/src/FileViewsData.php index 42df0ed0a66b31fb692bb105006ff0d79a028353..a5f1934c2ac4b07d1d222175224892dc9300ed66 100644 --- a/core/modules/file/src/FileViewsData.php +++ b/core/modules/file/src/FileViewsData.php @@ -15,7 +15,7 @@ class FileViewsData extends EntityViewsData { public function getViewsData() { $data = parent::getViewsData(); - // @TODO There is no corresponding information in entity metadata. + // @todo There is no corresponding information in entity metadata. $data['file_managed']['table']['base']['help'] = $this->t('Files maintained by Drupal and various modules.'); $data['file_managed']['table']['base']['defaults']['field'] = 'filename'; $data['file_managed']['table']['wizard_id'] = 'file_managed'; diff --git a/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php b/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php index 133d5c208a24e4ce89d795baccd42a965cbf8178..a548d3ed53d1f9d943dd6e68ed37c41d43e59546 100644 --- a/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php +++ b/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php @@ -214,7 +214,7 @@ public function testMultiValuedWidget() { $edit['files[test_file_field_1_0][' . $i . ']'] = \Drupal::service('file_system')->realpath($test_file->getFileUri()); } - // @todo: Replace after https://www.drupal.org/project/drupal/issues/2917885 + // @todo Replace after https://www.drupal.org/project/drupal/issues/2917885 $this->drupalGet('node/' . $node->id() . '/edit'); $this->assertSession()->fieldExists('files[test_file_field_1_0][]'); $submit_xpath = $this->assertSession()->buttonExists('Save')->getXpath(); diff --git a/core/modules/file/tests/src/Functional/MultipleFileUploadTest.php b/core/modules/file/tests/src/Functional/MultipleFileUploadTest.php index 473ef4b3c7565181876a480ba2c09c2460205e49..1d3a10ad9d8a4f15a57a90aed1842a46f60a9af5 100644 --- a/core/modules/file/tests/src/Functional/MultipleFileUploadTest.php +++ b/core/modules/file/tests/src/Functional/MultipleFileUploadTest.php @@ -49,7 +49,7 @@ public function testMultipleFileFieldWithAllFileExtensions() { $edit["files[multi_file][$i]"] = $file_path; } - // @todo: Replace after https://www.drupal.org/project/drupal/issues/2917885 + // @todo Replace after https://www.drupal.org/project/drupal/issues/2917885 $this->drupalGet("admin/appearance/settings/$theme"); $submit_xpath = $this->assertSession()->buttonExists('Save configuration')->getXpath(); $client = $this->getSession()->getDriver()->getClient(); diff --git a/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileImageDimensionsConstraintValidatorTest.php b/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileImageDimensionsConstraintValidatorTest.php index 3675ff79f53a50c0e1c8f6552e243df77a195826..049c222eb0184e3e871290514341333245695204 100644 --- a/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileImageDimensionsConstraintValidatorTest.php +++ b/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileImageDimensionsConstraintValidatorTest.php @@ -137,7 +137,7 @@ public function testFileValidateImageResolution() { \Drupal::service('file_system')->unlink('temporary://druplicon.png'); } else { - // TODO: should check that the error is returned if no toolkit is available. + // @todo Should check that the error is returned if no toolkit is available. $validators = [ 'FileImageDimensions' => [ 'maxDimensions' => '5x10', diff --git a/core/modules/filter/src/Plugin/DataType/FilterFormat.php b/core/modules/filter/src/Plugin/DataType/FilterFormat.php index cfc77ac97a72280403fbef3c15f3aca3c55fab1e..87a66831c86ab9c74bf4d185f786a33688c5371e 100644 --- a/core/modules/filter/src/Plugin/DataType/FilterFormat.php +++ b/core/modules/filter/src/Plugin/DataType/FilterFormat.php @@ -44,7 +44,7 @@ public function getSettableValues(?AccountInterface $account = NULL) { * {@inheritdoc} */ public function getSettableOptions(?AccountInterface $account = NULL) { - // @todo: Avoid calling functions but move to injected dependencies. + // @todo Avoid calling functions but move to injected dependencies. return array_map(function ($format) { return $format->label(); }, filter_formats($account)); diff --git a/core/modules/history/history.module b/core/modules/history/history.module index 2870e37b88a69e5b8fea2d21435a84e74e07c45c..f30ec39d880e8f1b12ce7fcd7aa6cac7e0dd668f 100644 --- a/core/modules/history/history.module +++ b/core/modules/history/history.module @@ -4,8 +4,7 @@ * @file * Records which users have read which content. * - * @todo - * - Generic helper for node_mark(). + * @todo Generic helper for node_mark(). */ use Drupal\Core\Url; diff --git a/core/modules/image/tests/src/Functional/ImageFieldTestBase.php b/core/modules/image/tests/src/Functional/ImageFieldTestBase.php index 68f0ddccadac2253632b304e762d045d3d5eee76..ad3c75d768a805c39812fd4f2bed3c4663713717 100644 --- a/core/modules/image/tests/src/Functional/ImageFieldTestBase.php +++ b/core/modules/image/tests/src/Functional/ImageFieldTestBase.php @@ -8,7 +8,7 @@ use Drupal\Tests\BrowserTestBase; /** - * TODO: Test the following functions. + * @todo Test the following functions. * * In file: * - image.effects.inc: diff --git a/core/modules/jsonapi/jsonapi.module b/core/modules/jsonapi/jsonapi.module index d8dc28aa4dca55e27ad353b87d9f8555f60bc7c8..6f0cf21dc73b2ebdb4a6352a2dc427c69c2a8d2e 100644 --- a/core/modules/jsonapi/jsonapi.module +++ b/core/modules/jsonapi/jsonapi.module @@ -144,7 +144,7 @@ function jsonapi_entity_bundle_delete() { */ function jsonapi_entity_create(EntityInterface $entity) { if (in_array($entity->getEntityTypeId(), ['field_storage_config', 'field_config'])) { - // @todo: only do this when relationship fields are updated, not just any field. + // @todo Only do this when relationship fields are updated, not just any field. JsonApiRoutes::rebuild(); } } @@ -154,7 +154,7 @@ function jsonapi_entity_create(EntityInterface $entity) { */ function jsonapi_entity_delete(EntityInterface $entity) { if (in_array($entity->getEntityTypeId(), ['field_storage_config', 'field_config'])) { - // @todo: only do this when relationship fields are updated, not just any field. + // @todo Only do this when relationship fields are updated, not just any field. JsonApiRoutes::rebuild(); } } diff --git a/core/modules/jsonapi/src/Context/FieldResolver.php b/core/modules/jsonapi/src/Context/FieldResolver.php index ff746b6e83bb218bb52ba90534997d48b6acc8ba..379c017c01ac19b64423be7d27b7e825ae9716bd 100644 --- a/core/modules/jsonapi/src/Context/FieldResolver.php +++ b/core/modules/jsonapi/src/Context/FieldResolver.php @@ -544,7 +544,8 @@ protected function getInternalName($field_name, array $resource_types) { */ protected function isMemberFilterable($external_name, array $resource_types) { return array_reduce($resource_types, function ($carry, ResourceType $resource_type) use ($external_name) { - // @todo: remove the next line and uncomment the following one in https://www.drupal.org/project/drupal/issues/3017047. + // @todo Remove the next line and uncomment the following one in + // https://www.drupal.org/project/drupal/issues/3017047. return $carry ?: $external_name === 'id' || $resource_type->isFieldEnabled($resource_type->getInternalName($external_name)); /*return $carry ?: in_array($external_name, ['id', 'type']) || $resource_type->isFieldEnabled($resource_type->getInternalName($external_name));*/ }, FALSE); diff --git a/core/modules/jsonapi/src/Controller/EntityResource.php b/core/modules/jsonapi/src/Controller/EntityResource.php index e19ef84866f2a1d13f06263fd254a6185bb4e6e3..7ddf02b8469fda107a52b15699ae080bbc3d6155 100644 --- a/core/modules/jsonapi/src/Controller/EntityResource.php +++ b/core/modules/jsonapi/src/Controller/EntityResource.php @@ -245,7 +245,7 @@ public function createIndividual(ResourceType $resource_type, Request $request) // User resource objects contain a read-only attribute that is not a // real field on the user entity type. // @see \Drupal\jsonapi\JsonApiResource\ResourceObject::extractContentEntityFields() - // @todo: eliminate this special casing in https://www.drupal.org/project/drupal/issues/3079254. + // @todo Eliminate this special casing in https://www.drupal.org/project/drupal/issues/3079254. if ($resource_type->getEntityTypeId() === 'user') { $field_mapping = array_diff($field_mapping, [$resource_type->getPublicName('display_name')]); } @@ -328,7 +328,7 @@ public function patchIndividual(ResourceType $resource_type, EntityInterface $en // User resource objects contain a read-only attribute that is not a real // field on the user entity type. // @see \Drupal\jsonapi\JsonApiResource\ResourceObject::extractContentEntityFields() - // @todo: eliminate this special casing in https://www.drupal.org/project/drupal/issues/3079254. + // @todo Eliminate this special casing in https://www.drupal.org/project/drupal/issues/3079254. if ($entity->getEntityTypeId() === 'user') { $field_names = array_diff($field_names, [$resource_type->getPublicName('display_name')]); } diff --git a/core/modules/jsonapi/src/Controller/EntryPoint.php b/core/modules/jsonapi/src/Controller/EntryPoint.php index 51444115b22fbcd5ed9fd59114ae58c16bc68077..6763d9e9a3d08d47d485017a593ecacd596e6f55 100644 --- a/core/modules/jsonapi/src/Controller/EntryPoint.php +++ b/core/modules/jsonapi/src/Controller/EntryPoint.php @@ -94,7 +94,7 @@ public function index() { // be used instead. Unfortunately, the `collection` link relation type // would not be semantically correct since it would imply that the // entrypoint is a *member* of the link target. - // @todo: implement an extension relation type to signal that this is a primary collection resource. + // @todo Implement an extension relation type to signal that this is a primary collection resource. $link_relation_type = $resource_type->getTypeName(); return $carry->withLink($resource_type->getTypeName(), new Link(new CacheableMetadata(), $url, $link_relation_type)); } diff --git a/core/modules/jsonapi/src/Exception/EntityAccessDeniedHttpException.php b/core/modules/jsonapi/src/Exception/EntityAccessDeniedHttpException.php index a2b21ca82d20896c8142e4057b58e0918e7f313c..b2b55c09291b1ae344a973ba396e571d2f4f27d4 100644 --- a/core/modules/jsonapi/src/Exception/EntityAccessDeniedHttpException.php +++ b/core/modules/jsonapi/src/Exception/EntityAccessDeniedHttpException.php @@ -71,7 +71,7 @@ public function __construct($entity, AccessResultInterface $entity_access, $poin $error['reason'] = $entity_access->getReason(); } $this->error = $error; - // @todo: remove this ternary operation in https://www.drupal.org/project/drupal/issues/2997594. + // @todo remove this ternary operation in https://www.drupal.org/project/drupal/issues/2997594. $this->resourceIdentifier = $entity ? ResourceIdentifier::fromEntity($entity) : NULL; } diff --git a/core/modules/jsonapi/src/JsonApiResource/ResourceObject.php b/core/modules/jsonapi/src/JsonApiResource/ResourceObject.php index 5ebba7c50228e667c5bdc77b496ee64d2aa74937..ba1f62a6e9b38ccd35ab64f05207c60562616c7e 100644 --- a/core/modules/jsonapi/src/JsonApiResource/ResourceObject.php +++ b/core/modules/jsonapi/src/JsonApiResource/ResourceObject.php @@ -311,7 +311,7 @@ protected static function extractContentEntityFields(ResourceType $resource_type // Special handling for user entities that allows a JSON:API user agent to // access the display name of a user. For example, this is useful when // displaying the name of a node's author. - // @todo: eliminate this special casing in https://www.drupal.org/project/drupal/issues/3079254. + // @todo Eliminate this special casing in https://www.drupal.org/project/drupal/issues/3079254. $entity_type = $entity->getEntityType(); if ($entity_type->id() == 'user' && $resource_type->isFieldEnabled('display_name')) { assert($entity instanceof UserInterface); @@ -344,7 +344,7 @@ protected static function getLabelFieldName(EntityInterface $entity) { // access the display name of a user. This is useful when displaying the // name of a node's author. // @see \Drupal\jsonapi\JsonApiResource\ResourceObject::extractContentEntityFields() - // @todo: eliminate this special casing in https://www.drupal.org/project/drupal/issues/3079254. + // @todo Eliminate this special casing in https://www.drupal.org/project/drupal/issues/3079254. if ($entity->getEntityTypeId() === 'user') { $label_field_name = 'display_name'; } diff --git a/core/modules/jsonapi/src/Normalizer/ContentEntityDenormalizer.php b/core/modules/jsonapi/src/Normalizer/ContentEntityDenormalizer.php index 6748e1a30d207754b913f68e83d5b1dfb10251af..d4c0695d40705327d754b87b318f783a1c0ab397 100644 --- a/core/modules/jsonapi/src/Normalizer/ContentEntityDenormalizer.php +++ b/core/modules/jsonapi/src/Normalizer/ContentEntityDenormalizer.php @@ -45,7 +45,7 @@ protected function prepareInput(array $data, ResourceType $resource_type, $forma // User resource objects contain a read-only attribute that is not a real // field on the user entity type. // @see \Drupal\jsonapi\JsonApiResource\ResourceObject::extractContentEntityFields() - // @todo: eliminate this special casing in https://www.drupal.org/project/drupal/issues/3079254. + // @todo Eliminate this special casing in https://www.drupal.org/project/drupal/issues/3079254. if ($entity_type_id === 'user') { $data = array_diff_key($data, array_flip([$resource_type->getPublicName('display_name')])); } diff --git a/core/modules/jsonapi/src/Normalizer/JsonApiDocumentTopLevelNormalizer.php b/core/modules/jsonapi/src/Normalizer/JsonApiDocumentTopLevelNormalizer.php index 8e616b498d1ace1533d0f58400903480991d5918..e7d55cdfc67751d412cbb1948ded50ea573a1f46 100644 --- a/core/modules/jsonapi/src/Normalizer/JsonApiDocumentTopLevelNormalizer.php +++ b/core/modules/jsonapi/src/Normalizer/JsonApiDocumentTopLevelNormalizer.php @@ -214,7 +214,7 @@ public function normalize($object, $format = NULL, array $context = []): array|s * @return \Drupal\jsonapi\Normalizer\Value\CacheableNormalization * The normalized document. * - * @todo: refactor this to use CacheableNormalization::aggregate in https://www.drupal.org/project/drupal/issues/3036284. + * @todo Refactor this to use CacheableNormalization::aggregate in https://www.drupal.org/project/drupal/issues/3036284. */ protected function normalizeErrorDocument(JsonApiDocumentTopLevel $document, $format, array $context = []) { $normalized_values = array_map(function (HttpExceptionInterface $exception) use ($format, $context) { @@ -242,7 +242,7 @@ protected function normalizeErrorDocument(JsonApiDocumentTopLevel $document, $fo * @return \Drupal\jsonapi\Normalizer\Value\CacheableNormalization|\Drupal\jsonapi\Normalizer\Value\CacheableOmission * The normalized omissions. * - * @todo: refactor this to use link collections in https://www.drupal.org/project/drupal/issues/3036279. + * @todo Refactor this to use link collections in https://www.drupal.org/project/drupal/issues/3036279. */ protected function normalizeOmissionsLinks(OmittedData $omissions, $format, array $context = []) { $normalized_omissions = array_map(function (HttpExceptionInterface $exception) use ($format, $context) { diff --git a/core/modules/jsonapi/src/ResourceType/ResourceTypeRepository.php b/core/modules/jsonapi/src/ResourceType/ResourceTypeRepository.php index 901ec2104b155e09ead54bb428140fdec142db44..36ceb8e08c6cd7c17ee0bc19a576d1bc2ba374eb 100644 --- a/core/modules/jsonapi/src/ResourceType/ResourceTypeRepository.php +++ b/core/modules/jsonapi/src/ResourceType/ResourceTypeRepository.php @@ -301,7 +301,7 @@ protected function getFields(array $field_names, EntityTypeInterface $entity_typ // access the display name of a user. This is useful when displaying the // name of a node's author. // @see \Drupal\jsonapi\JsonApiResource\ResourceObject::extractContentEntityFields() - // @todo: eliminate this special casing in https://www.drupal.org/project/drupal/issues/3079254. + // @todo Eliminate this special casing in https://www.drupal.org/project/drupal/issues/3079254. if ($entity_type->id() === 'user') { $fields['display_name'] = new ResourceTypeAttribute('display_name'); } diff --git a/core/modules/jsonapi/tests/src/Functional/EntityFormModeTest.php b/core/modules/jsonapi/tests/src/Functional/EntityFormModeTest.php index 3dc6af948846f80ad440d338ec153f94968fcefd..4f9633bc2cde772f816d53822da6cee457f9d55c 100644 --- a/core/modules/jsonapi/tests/src/Functional/EntityFormModeTest.php +++ b/core/modules/jsonapi/tests/src/Functional/EntityFormModeTest.php @@ -18,7 +18,7 @@ class EntityFormModeTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} * - * @todo: Remove 'field_ui' when https://www.drupal.org/node/2867266. + * @todo Remove 'field_ui' when https://www.drupal.org/node/2867266. */ protected static $modules = ['user', 'field_ui']; diff --git a/core/modules/jsonapi/tests/src/Functional/EntityViewModeTest.php b/core/modules/jsonapi/tests/src/Functional/EntityViewModeTest.php index e99978408ca9b00aba039d184a7a8945bc4e19e6..4f0ff14c141857253bde0b4bd49f5735a59b502f 100644 --- a/core/modules/jsonapi/tests/src/Functional/EntityViewModeTest.php +++ b/core/modules/jsonapi/tests/src/Functional/EntityViewModeTest.php @@ -18,7 +18,7 @@ class EntityViewModeTest extends ConfigEntityResourceTestBase { /** * {@inheritdoc} * - * @todo: Remove 'field_ui' when https://www.drupal.org/node/2867266. + * @todo Remove 'field_ui' when https://www.drupal.org/node/2867266. */ protected static $modules = ['user', 'field_ui']; diff --git a/core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php b/core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php index 80c6efbfcf02dce5ee1a16199d0b04062365ef81..f54943a9b9dc12676f6cae0d0144a04ca169f897 100644 --- a/core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php +++ b/core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php @@ -3035,7 +3035,7 @@ public function testRevisions() { $actual_response = $this->request('GET', $rel_working_copy_collection_url, $request_options); $expected_collection_document['links']['self']['href'] = $rel_working_copy_collection_url->toString(); $this->assertResourceResponse(200, $expected_collection_document, $actual_response, $expected_cacheability->getCacheTags(), $expected_cacheability->getCacheContexts(), FALSE, 'MISS'); - // @todo: remove the next assertion when Drupal core supports entity query access control on revisions. + // @todo Remove the next assertion when Drupal core supports entity query access control on revisions. $rel_working_copy_collection_url_filtered = clone $rel_working_copy_collection_url; $rel_working_copy_collection_url_filtered->setOption('query', ['filter[foo]' => 'bar'] + $rel_working_copy_collection_url->getOption('query')); $actual_response = $this->request('GET', $rel_working_copy_collection_url_filtered, $request_options); @@ -3206,7 +3206,7 @@ public function testRevisions() { $this->assertResourceResponse(403, $expected_document, $actual_response, $expected_cache_tags, $expected_cacheability->getCacheContexts()); // Request the related route. $actual_response = $this->request('GET', $related_url, $request_options); - // @todo: refactor self::getExpectedRelatedResponses() into a function which returns a single response. + // @todo Refactor self::getExpectedRelatedResponses() into a function which returns a single response. $expected_response = $this->getExpectedRelatedResponses(['field_jsonapi_test_entity_ref'], $request_options, $revision)['field_jsonapi_test_entity_ref']; $expected_document = $expected_response->getResponseData(); $expected_cacheability = $expected_response->getCacheableMetadata(); diff --git a/core/modules/locale/locale.bulk.inc b/core/modules/locale/locale.bulk.inc index 652871c6eb49b17cc5209869d5917411d1197228..36a11f30559d8dc2e89e9e5ed679ac2ee8ac39c1 100644 --- a/core/modules/locale/locale.bulk.inc +++ b/core/modules/locale/locale.bulk.inc @@ -33,10 +33,9 @@ * @return array|bool * The batch structure, or FALSE if no files are used to build the batch. * - * @todo - * Integrate with update status to identify projects needed and integrate + * @todo Integrate with update status to identify projects needed and integrate * l10n_update functionality to feed in translation files alike. - * See https://www.drupal.org/node/1191488. + * https://www.drupal.org/node/1191488 */ function locale_translate_batch_import_files(array $options, $force = FALSE) { $options += [ diff --git a/core/modules/locale/src/PluralFormula.php b/core/modules/locale/src/PluralFormula.php index 398fc0f2340cc2efa6c273f435938655f2dba657..b93658f9321ff2226b8a91ba7dfbcd5d0e472e3d 100644 --- a/core/modules/locale/src/PluralFormula.php +++ b/core/modules/locale/src/PluralFormula.php @@ -31,7 +31,7 @@ class PluralFormula implements PluralFormulaInterface { * 'de' => [ * 'plurals' => 2, * 'formula' => [ - * // @todo + * // @todo Provide the formula. * ] * ], * ] diff --git a/core/modules/media_library/src/MediaLibraryState.php b/core/modules/media_library/src/MediaLibraryState.php index ff9912e59f604d1ddb2960702d592be97d7f6024..12491abd0ad451882324c59e786c0ec31484cb66 100644 --- a/core/modules/media_library/src/MediaLibraryState.php +++ b/core/modules/media_library/src/MediaLibraryState.php @@ -114,7 +114,8 @@ public static function fromRequest(Request $request) { throw new BadRequestHttpException("Invalid media library parameters specified."); } - // @todo: Review parameters passed and remove irrelevant ones in https://www.drupal.org/i/3396650 + // @todo Review parameters passed and remove irrelevant ones in + // https://www.drupal.org/i/3396650 // Once we have validated the required parameters, we restore the parameters // from the request since there might be additional values. diff --git a/core/modules/migrate/src/MigrateExecutable.php b/core/modules/migrate/src/MigrateExecutable.php index af1f6dbc9e08e5458f677d771c631de905ea37f0..e3d16b4ac7354433ab36b481f592c2cc9de20e20 100644 --- a/core/modules/migrate/src/MigrateExecutable.php +++ b/core/modules/migrate/src/MigrateExecutable.php @@ -612,7 +612,7 @@ protected function attemptMemoryReclaim() { // Entity storage can blow up with caches, so clear it out. \Drupal::service('entity.memory_cache')->deleteAll(); - // @TODO: explore resetting the container. + // @todo Explore resetting the container. // Run garbage collector to further reduce memory. gc_collect_cycles(); diff --git a/core/modules/migrate/src/Plugin/migrate/destination/Entity.php b/core/modules/migrate/src/Plugin/migrate/destination/Entity.php index e98792ca270687d1d3afe807e95f009a961b10dd..28f26ff35aa30f3174a90a308fe152f064a6d0e6 100644 --- a/core/modules/migrate/src/Plugin/migrate/destination/Entity.php +++ b/core/modules/migrate/src/Plugin/migrate/destination/Entity.php @@ -149,7 +149,7 @@ public function getBundle(Row $row) { * {@inheritdoc} */ public function fields() { - // TODO: Implement fields() method. + // @todo Implement fields() method. } /** diff --git a/core/modules/migrate/src/Plugin/migrate/destination/EntityFieldStorageConfig.php b/core/modules/migrate/src/Plugin/migrate/destination/EntityFieldStorageConfig.php index 0a3530869b307a78ea2266fe953a5b2a44a7e9d7..b0350c5bb23c2de017031c241c3a3605dc96c155 100644 --- a/core/modules/migrate/src/Plugin/migrate/destination/EntityFieldStorageConfig.php +++ b/core/modules/migrate/src/Plugin/migrate/destination/EntityFieldStorageConfig.php @@ -57,7 +57,7 @@ class EntityFieldStorageConfig extends EntityConfigBase { public function getIds() { $ids['entity_type']['type'] = 'string'; $ids['field_name']['type'] = 'string'; - // @todo: Remove conditional. https://www.drupal.org/node/3004574 + // @todo Remove conditional. https://www.drupal.org/node/3004574 if ($this->isTranslationDestination()) { $ids['langcode']['type'] = 'string'; } diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/source/ContentEntity.php b/core/modules/migrate_drupal/src/Plugin/migrate/source/ContentEntity.php index b66e89a1feefa748f8f30d35715287827956d6a8..275c635db2bcaf26b4dc4ecd926fca84cfd8c6ce 100644 --- a/core/modules/migrate_drupal/src/Plugin/migrate/source/ContentEntity.php +++ b/core/modules/migrate_drupal/src/Plugin/migrate/source/ContentEntity.php @@ -247,8 +247,8 @@ public function count($refresh = FALSE): int { if (!$this->configuration['include_translations']) { return parent::count($refresh); } - // @TODO: Determine a better way to retrieve a valid count for translations. - // https://www.drupal.org/project/drupal/issues/2937166 + // @todo Determine a better way to retrieve a valid count for translations. + // https://www.drupal.org/project/drupal/issues/2937166 return MigrateSourceInterface::NOT_COUNTABLE; } diff --git a/core/modules/node/src/Plugin/views/wizard/Node.php b/core/modules/node/src/Plugin/views/wizard/Node.php index 6e2ca1d1f2d69ef9017b279a1dc56edb7c47f4ca..b29396fcbba4b1cf91cf751b072cc56bc0c09d43 100644 --- a/core/modules/node/src/Plugin/views/wizard/Node.php +++ b/core/modules/node/src/Plugin/views/wizard/Node.php @@ -14,7 +14,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; /** - * @todo: replace numbers with constants. + * @todo Replace numbers with constants. */ /** diff --git a/core/modules/node/src/Plugin/views/wizard/NodeRevision.php b/core/modules/node/src/Plugin/views/wizard/NodeRevision.php index 1a7121eb007a847cdc8a2281d5810435620fdf39..c10389cc2392f9cd0ba7bf263d1d00db1f714c17 100644 --- a/core/modules/node/src/Plugin/views/wizard/NodeRevision.php +++ b/core/modules/node/src/Plugin/views/wizard/NodeRevision.php @@ -8,7 +8,7 @@ use Drupal\views\Plugin\views\wizard\WizardPluginBase; /** - * @todo: replace numbers with constants. + * @todo Replace numbers with constants. */ /** diff --git a/core/modules/rest/src/Routing/ResourceRoutes.php b/core/modules/rest/src/Routing/ResourceRoutes.php index 21fc270caa49ba77d41b9b91fc23c7ba51593ad5..cee498186c2eed3d409434344101200e6491065a 100644 --- a/core/modules/rest/src/Routing/ResourceRoutes.php +++ b/core/modules/rest/src/Routing/ResourceRoutes.php @@ -89,7 +89,7 @@ protected function getRoutesForResourceConfig(RestResourceConfigInterface $rest_ foreach ($plugin->routes() as $name => $route) { /** @var \Symfony\Component\Routing\Route $route */ - // @todo: Are multiple methods possible here? + // @todo Are multiple methods possible here? $methods = $route->getMethods(); // Only expose routes that have an explicit method and allow >=1 format // for that method. diff --git a/core/modules/system/system.install b/core/modules/system/system.install index 531871b1cbf17d0a4b68c000eb29a867e75ae70b..5671d6c7effe9e3714335a25527a1302c7d49b91 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -1600,7 +1600,7 @@ function system_install() { function system_schema() { // @deprecated The sequences table has been deprecated in drupal:10.2.0 and is // removed from drupal:12.0.0. See https://www.drupal.org/node/3220378. - // @todo: Remove sequences table in Drupal 12. See https://www.drupal.org/i/3335756 + // @todo Remove sequences table in Drupal 12. See https://www.drupal.org/i/3335756 $schema['sequences'] = [ 'description' => 'Stores IDs.', 'fields' => [ diff --git a/core/modules/system/tests/modules/entity_test/src/EntityTestForm.php b/core/modules/system/tests/modules/entity_test/src/EntityTestForm.php index 3ea354d54993f929c25c1b625660fdd96896582f..7d8b9c087b421a32803749310fb4e07ae787004a 100644 --- a/core/modules/system/tests/modules/entity_test/src/EntityTestForm.php +++ b/core/modules/system/tests/modules/entity_test/src/EntityTestForm.php @@ -32,7 +32,7 @@ public function form(array $form, FormStateInterface $form_state) { $form = parent::form($form, $form_state); $entity = $this->entity; - // @todo: Is there a better way to check if an entity type is revisionable? + // @todo Is there a better way to check if an entity type is revisionable? if ($entity->getEntityType()->hasKey('revision') && !$entity->isNew()) { $form['revision'] = [ '#type' => 'checkbox', diff --git a/core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php b/core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php index 174083691232e9e09c022016b9d21d1207622e93..b17ce056b81439ee9ae57dd81b15f948c0880c5d 100644 --- a/core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php +++ b/core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php @@ -111,7 +111,7 @@ public function title() { if (!empty($term)) { return $term->label(); } - // @todo review text + // @todo Review text. return $this->t('No name'); } diff --git a/core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php b/core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php index d7b7de8dbb7f422df2ffddb8fe31ce205d02af17..353e913e043c89e922909233041c93e41c7eb05e 100644 --- a/core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php +++ b/core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php @@ -60,7 +60,7 @@ public static function create(ContainerInterface $container, array $configuratio public function init(ViewExecutable $view, DisplayPluginBase $display, ?array &$options = NULL) { parent::init($view, $display, $options); - // @todo: Wouldn't it be possible to use $this->base_table and no if here? + // @todo Wouldn't it be possible to use $this->base_table and no if here? if ($view->storage->get('base_table') == 'node_field_revision') { $this->additional_fields['nid'] = ['table' => 'node_field_revision', 'field' => 'nid']; } diff --git a/core/modules/text/src/Plugin/Field/FieldType/TextItemBase.php b/core/modules/text/src/Plugin/Field/FieldType/TextItemBase.php index e40849cbcd5a9f66b47017c0c96299212cbc1839..398c115da30ccc3799378e29d10b7566b9560c99 100644 --- a/core/modules/text/src/Plugin/Field/FieldType/TextItemBase.php +++ b/core/modules/text/src/Plugin/Field/FieldType/TextItemBase.php @@ -97,7 +97,7 @@ public static function propertyDefinitions(FieldStorageDefinitionInterface $fiel * {@inheritdoc} */ public function applyDefaultValue($notify = TRUE) { - // @todo: Add in the filter default format here. + // @todo Add in the filter default format here. $this->setValue(['format' => NULL], $notify); return $this; } diff --git a/core/modules/update/src/Form/UpdateManagerInstall.php b/core/modules/update/src/Form/UpdateManagerInstall.php index 670a8f4f0d83cdb40d29567223118ebbce9b8359..bb851ddebd4997c6d1b5ab88e80a585ad23ae72e 100644 --- a/core/modules/update/src/Form/UpdateManagerInstall.php +++ b/core/modules/update/src/Form/UpdateManagerInstall.php @@ -199,8 +199,8 @@ public function submitForm(array &$form, FormStateInterface $form_state) { $archive_errors = $this->moduleHandler->invokeAll('verify_update_archive', [$project, $local_cache, $directory]); if (!empty($archive_errors)) { $this->messenger()->addError(array_shift($archive_errors)); - // @todo: Fix me in D8: We need a way to set multiple errors on the same - // form element and have all of them appear! + // @todo Fix me in D8: We need a way to set multiple errors on the same + // form element and have all of them appear! if (!empty($archive_errors)) { foreach ($archive_errors as $error) { $this->messenger()->addError($error); diff --git a/core/modules/user/src/Entity/User.php b/core/modules/user/src/Entity/User.php index 8676bf12a894a8cf17bf0bc5f9ddcf8474788ee3..84d384b0060f8250abab579b3ab6c0f779db935e 100644 --- a/core/modules/user/src/Entity/User.php +++ b/core/modules/user/src/Entity/User.php @@ -470,8 +470,8 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { $fields['preferred_langcode'] = BaseFieldDefinition::create('language') ->setLabel(t('Preferred language code')) ->setDescription(t("The user's preferred language code for receiving emails and viewing the site.")) - // @todo: Define this via an options provider once - // https://www.drupal.org/node/2329937 is completed. + // @todo Define this via an options provider once + // https://www.drupal.org/node/2329937 is completed. ->addPropertyConstraints('value', [ 'AllowedValues' => ['callback' => __CLASS__ . '::getAllowedConfigurableLanguageCodes'], ]); @@ -479,12 +479,12 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { $fields['preferred_admin_langcode'] = BaseFieldDefinition::create('language') ->setLabel(t('Preferred admin language code')) ->setDescription(t("The user's preferred language code for viewing administration pages.")) - // @todo: A default value of NULL is ignored, so we have to specify - // an empty field item structure instead. Fix this in - // https://www.drupal.org/node/2318605. + // @todo A default value of NULL is ignored, so we have to specify + // an empty field item structure instead. Fix this in + // https://www.drupal.org/node/2318605. ->setDefaultValue([0 => ['value' => NULL]]) - // @todo: Define this via an options provider once - // https://www.drupal.org/node/2329937 is completed. + // @todo Define this via an options provider once + // https://www.drupal.org/node/2329937 is completed. ->addPropertyConstraints('value', [ 'AllowedValues' => ['callback' => __CLASS__ . '::getAllowedConfigurableLanguageCodes'], ]); @@ -520,8 +520,8 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { ->setLabel(t('Timezone')) ->setDescription(t('The timezone of this user.')) ->setSetting('max_length', 32) - // @todo: Define this via an options provider once - // https://www.drupal.org/node/2329937 is completed. + // @todo Define this via an options provider once + // https://www.drupal.org/node/2329937 is completed. ->addPropertyConstraints('value', [ 'AllowedValues' => ['callback' => __CLASS__ . '::getAllowedTimezones'], ]); diff --git a/core/modules/user/src/PermissionHandler.php b/core/modules/user/src/PermissionHandler.php index 744f23aa7d5895d257b213b672280d99ac98b91e..1b2351b2958e0edaed2adaf9ec71d229de51d1f4 100644 --- a/core/modules/user/src/PermissionHandler.php +++ b/core/modules/user/src/PermissionHandler.php @@ -122,8 +122,8 @@ public function getPermissions() { * {@inheritdoc} */ public function moduleProvidesPermissions($module_name) { - // @TODO Static cache this information, see - // https://www.drupal.org/node/2339487 + // @todo Static cache this information. + // https://www.drupal.org/node/2339487 $permissions = $this->getPermissions(); foreach ($permissions as $permission) { diff --git a/core/modules/user/src/Plugin/views/wizard/Users.php b/core/modules/user/src/Plugin/views/wizard/Users.php index 92b8f28d901c9c820f6ee98eff4569cdd218065c..af8e3d178b9ec0d680c5cc2ff5cf44a2a53aceea 100644 --- a/core/modules/user/src/Plugin/views/wizard/Users.php +++ b/core/modules/user/src/Plugin/views/wizard/Users.php @@ -7,7 +7,7 @@ use Drupal\views\Plugin\views\wizard\WizardPluginBase; /** - * @todo: replace numbers with constants. + * @todo Replace numbers with constants. */ /** diff --git a/core/modules/user/tests/src/Functional/Views/UserTestBase.php b/core/modules/user/tests/src/Functional/Views/UserTestBase.php index 133e4f9281901032d49ccf57ab1d4144289b9c69..896f5ab73555155ecf1a8f7b9a67348c54c3162c 100644 --- a/core/modules/user/tests/src/Functional/Views/UserTestBase.php +++ b/core/modules/user/tests/src/Functional/Views/UserTestBase.php @@ -7,9 +7,6 @@ use Drupal\Tests\views\Functional\ViewTestBase; use Drupal\user\Entity\User; -/** - * @todo. - */ abstract class UserTestBase extends ViewTestBase { /** diff --git a/core/modules/views/src/Plugin/views/PluginBase.php b/core/modules/views/src/Plugin/views/PluginBase.php index 31a5979dcaa1c7474dd9b11d95fcebc5dfd56082..c154930fe49791a6ed8240a0426e1ca5b77784d0 100644 --- a/core/modules/views/src/Plugin/views/PluginBase.php +++ b/core/modules/views/src/Plugin/views/PluginBase.php @@ -368,7 +368,7 @@ protected function viewsTokenReplace($text, $tokens) { foreach ($tokens as $token => $replacement) { // Twig wants a token replacement array stripped of curly-brackets. // Some Views tokens come with curly-braces, others do not. - // @todo: https://www.drupal.org/node/2544392 + // @todo https://www.drupal.org/node/2544392 if (str_contains($token, '{{')) { // Twig wants a token replacement array stripped of curly-brackets. $token = trim(str_replace(['{{', '}}'], '', $token)); @@ -420,7 +420,7 @@ function ($children, $elements) { // Currently you cannot attach assets to tokens with // Renderer::renderInIsolation(). This may be unnecessarily limiting. Consider // using Renderer::executeInRenderContext() instead. - // @todo: https://www.drupal.org/node/2566621 + // @todo https://www.drupal.org/node/2566621 return (string) $this->getRenderer()->renderInIsolation($build); } else { diff --git a/core/modules/views/src/Plugin/views/area/Result.php b/core/modules/views/src/Plugin/views/area/Result.php index cd5c3179863ab04e997f8ea63f6dbf7cce91e03b..d90aa89b862f103c9cd45ce883f3b85699786974 100644 --- a/core/modules/views/src/Plugin/views/area/Result.php +++ b/core/modules/views/src/Plugin/views/area/Result.php @@ -78,7 +78,7 @@ public function render($empty = FALSE) { // Calculate the page totals. $current_page = (int) $this->view->getCurrentPage() + 1; $per_page = (int) $this->view->getItemsPerPage(); - // @TODO: Maybe use a possible is views empty functionality. + // @todo Maybe use a possible is views empty functionality. // Not every view has total_rows set, use view->result instead. $total = $this->view->total_rows ?? count($this->view->result); $label = Html::escape($this->view->storage->label()); diff --git a/core/modules/views/src/Plugin/views/argument/ManyToOne.php b/core/modules/views/src/Plugin/views/argument/ManyToOne.php index 2ede2c9d4f8ecc33b5f7bc878fab6d05eed4c0e4..be618bfd7744af607ed106367af4010268315cb8 100644 --- a/core/modules/views/src/Plugin/views/argument/ManyToOne.php +++ b/core/modules/views/src/Plugin/views/argument/ManyToOne.php @@ -146,7 +146,7 @@ public function title() { $this->operator = 'or'; } - // @todo -- both of these should check definition for alternate keywords. + // @todo Both of these should check definition for alternate keywords. if (empty($this->value)) { return !empty($this->definition['empty field name']) ? $this->definition['empty field name'] : $this->t('Uncategorized'); diff --git a/core/modules/views/src/Plugin/views/display/Embed.php b/core/modules/views/src/Plugin/views/display/Embed.php index 9ed3584f2a74c3355a0c8571f49e1d330a2cd013..33205f55e3c0ca1b592bcccd557dd9648d765073 100644 --- a/core/modules/views/src/Plugin/views/display/Embed.php +++ b/core/modules/views/src/Plugin/views/display/Embed.php @@ -10,8 +10,8 @@ * * @ingroup views_display_plugins * - * @todo: Wait until annotations/plugins support access methods. - * no_ui => !\Drupal::config('views.settings')->get('ui.show.display_embed'), + * @todo Wait until annotations/plugins support access methods. + * no_ui => !\Drupal::config('views.settings')->get('ui.show.display_embed'), */ #[ViewsDisplay( id: "embed", diff --git a/core/modules/views/src/Plugin/views/field/LinkBase.php b/core/modules/views/src/Plugin/views/field/LinkBase.php index 83eec2247232719e3218bc01853e57859e415beb..7bfb7e6ce2865a22d885a32eefbb989d0918bdf4 100644 --- a/core/modules/views/src/Plugin/views/field/LinkBase.php +++ b/core/modules/views/src/Plugin/views/field/LinkBase.php @@ -102,7 +102,7 @@ public static function create(ContainerInterface $container, array $configuratio /** * Gets the current active user. * - * @todo: https://www.drupal.org/node/2105123 put this method in + * @todo https://www.drupal.org/node/2105123 put this method in * \Drupal\Core\Plugin\PluginBase instead. * * @return \Drupal\Core\Session\AccountInterface diff --git a/core/modules/views/src/Plugin/views/query/Sql.php b/core/modules/views/src/Plugin/views/query/Sql.php index 12242518469ee616a42e93041b3f1107287a8323..0f424ea0c2c627efc43ad4e7a87f0ab536f66f69 100644 --- a/core/modules/views/src/Plugin/views/query/Sql.php +++ b/core/modules/views/src/Plugin/views/query/Sql.php @@ -649,11 +649,11 @@ public function ensureTable($table, $relationship = NULL, ?JoinPluginBase $join // scan through the table queue to see if a matching join and // relationship exists. If so, use it instead of this join. - // TODO: Scanning through $this->tableQueue results in an - // O(N^2) algorithm, and this code runs every time the view is - // instantiated (Views 2 does not currently cache queries). - // There are a couple possible "improvements" but we should do - // some performance testing before picking one. + // @todo Scanning through $this->tableQueue results in an + // O(N^2) algorithm, and this code runs every time the view is + // instantiated (Views 2 does not currently cache queries). + // There are a couple possible "improvements" but we should do + // some performance testing before picking one. foreach ($this->tableQueue as $queued_table) { // In PHP 4 and 5, the == operation returns TRUE for two objects // if they are instances of the same class and have the same @@ -1049,7 +1049,7 @@ public function addHavingExpression($group, $snippet, $args = []) { */ public function addOrderBy($table, $field = NULL, $order = 'ASC', $alias = '', $params = []) { // Only ensure the table if it's not the special random key. - // @todo: Maybe it would make sense to just add an addOrderByRand or something similar. + // @todo Maybe it would make sense to just add an addOrderByRand or something similar. if ($table && $table != 'rand') { $this->ensureTable($table); } @@ -1740,8 +1740,8 @@ public function addSignature(ViewExecutable $view) { } public function getAggregationInfo() { - // @todo -- need a way to get database specific and customized aggregation - // functions into here. + // @todo Need a way to get database specific and customized aggregation + // functions into here. return [ 'group' => [ 'title' => $this->t('Group results together'), diff --git a/core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php b/core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php index eaa206f35eeb24964908c3b81e811f8dd6c0fb58..a3969b26f3a36e847c6c53a1b13da409adddc6e2 100644 --- a/core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php +++ b/core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php @@ -131,8 +131,8 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { // - base must the base that our relationship joins towards // - must have fields. if ($view->get('base_table') == $this->definition['base'] && !empty($view->getDisplay('default')['display_options']['fields'])) { - // TODO: check the field is the correct sort? - // or let users hang themselves at this stage and check later? + // @todo check the field is the correct sort? + // or let users hang themselves at this stage and check later? $views[$view->id()] = $view->id(); } } @@ -270,9 +270,9 @@ protected function leftQuery($options) { $where = &$subquery->conditions(); $this->alterSubqueryCondition($subquery, $where); // Not sure why, but our sort order clause doesn't have a table. - // TODO: the call to addHandler() above to add the sort handler is probably - // wrong -- needs attention from someone who understands it. - // In the meantime, this works, but with a leap of faith. + // @todo The call to addHandler() above to add the sort handler is probably + // wrong -- needs attention from someone who understands it. + // In the meantime, this works, but with a leap of faith. $orders = &$subquery->getOrderBy(); foreach ($orders as $order_key => $order) { // But if we're using a whole view, we don't know what we have! diff --git a/core/modules/views/src/Plugin/views/style/DefaultSummary.php b/core/modules/views/src/Plugin/views/style/DefaultSummary.php index 3df57c2e827c8b6593d450b26b4009f506869106..56b875dc139546fe067e99642981f815466132a1 100644 --- a/core/modules/views/src/Plugin/views/style/DefaultSummary.php +++ b/core/modules/views/src/Plugin/views/style/DefaultSummary.php @@ -74,7 +74,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { public function render() { $rows = []; foreach ($this->view->result as $row) { - // @todo: Include separator as an option. + // @todo Include separator as an option. $rows[] = $row; } diff --git a/core/modules/views/src/Plugin/views/style/StylePluginBase.php b/core/modules/views/src/Plugin/views/style/StylePluginBase.php index 156ed3792e325122425b1042d73f58c830bddb67..d8ecefc83ae635f459b73847249d9ca49c07d00d 100644 --- a/core/modules/views/src/Plugin/views/style/StylePluginBase.php +++ b/core/modules/views/src/Plugin/views/style/StylePluginBase.php @@ -284,7 +284,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { // Only fields-based views can handle grouping. Style plugins can also exclude // themselves from being groupable by setting their "usesGrouping" property // to FALSE. - // @TODO: Document "usesGrouping" in docs.php when docs.php is written. + // @todo Document "usesGrouping" in docs.php when docs.php is written. if ($this->usesFields() && $this->usesGrouping()) { $options = ['' => $this->t('- None -')]; $field_labels = $this->displayHandler->getFieldLabels(TRUE); @@ -632,7 +632,7 @@ public function renderGrouping($records, $groupings = [], $group_rendered = NULL // If this parameter isn't explicitly set, modify the output to be fully // backward compatible to code before Views 7.x-3.0-rc2. - // @TODO Remove this as soon as possible e.g. October 2020 + // @todo Remove this as soon as possible e.g. October 2020 if ($group_rendered === NULL) { $old_style_sets = []; foreach ($sets as $group) { diff --git a/core/modules/views/src/ViewExecutable.php b/core/modules/views/src/ViewExecutable.php index 9895bd687ea87ba030a8bed2abbeb4c175d9674e..ff1ee74da94ce7c20a63d63ee58944917f97e5ae 100644 --- a/core/modules/views/src/ViewExecutable.php +++ b/core/modules/views/src/ViewExecutable.php @@ -1283,7 +1283,7 @@ public function build($display_id = NULL) { // Call a module hook and see if it wants to present us with a // pre-built query or instruct us not to build the query for // some reason. - // @todo: Implement this. Use the same mechanism Panels uses. + // @todo Implement this. Use the same mechanism Panels uses. // Run through our handlers and ensure they have necessary information. $this->initHandlers(); diff --git a/core/modules/views/tests/src/Functional/Plugin/PagerTest.php b/core/modules/views/tests/src/Functional/Plugin/PagerTest.php index d6e7dbc04d533df7fa8a9254b0425d27f733b753..a36450509c326680a84b322d5bfb9b5068735d09 100644 --- a/core/modules/views/tests/src/Functional/Plugin/PagerTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/PagerTest.php @@ -336,7 +336,7 @@ public function testNormalPager() { $this->assertCount(11, $view->result, 'All items are return'); - // TODO test number of pages. + // @todo Test number of pages. // Test items per page = 0. // Setup and test an offset. diff --git a/core/modules/views/tests/src/Kernel/Entity/EntityViewsDataTest.php b/core/modules/views/tests/src/Kernel/Entity/EntityViewsDataTest.php index 22ecad80787b448caa2a7399a710b72d91bb4a9f..d3c8fcbf82001743f1591684ab94ffd858086ad7 100644 --- a/core/modules/views/tests/src/Kernel/Entity/EntityViewsDataTest.php +++ b/core/modules/views/tests/src/Kernel/Entity/EntityViewsDataTest.php @@ -182,7 +182,7 @@ public function testBaseTables() { $this->assertEquals(['entity_test_list_cache_context'], $data['entity_test']['table']['base']['cache_contexts']); $this->assertEquals('Entity test', $data['entity_test']['table']['base']['title']); - // TODO: change these to assertArrayNotHasKey(). + // @todo Change these to assertArrayNotHasKey(). $this->assertFalse(isset($data['entity_test']['table']['defaults'])); $this->assertFalse(isset($data['entity_test_mul_property_data'])); @@ -204,8 +204,8 @@ public function testDataTable() { // Tests the join definition between the base and the data table. $data = $this->entityTypeManager->getHandler('entity_test_mul', 'views_data')->getViewsData(); - // TODO: change the base table in the entity type definition to match the - // changed entity ID. + // @todo Change the base table in the entity type definition to match the + // changed entity ID. $base_views_data = $data['entity_test']; // Ensure that the base table is set to the data table. diff --git a/core/modules/views/tests/src/Unit/Plugin/Block/ViewsBlockTest.php b/core/modules/views/tests/src/Unit/Plugin/Block/ViewsBlockTest.php index f05589b85021ddc821a1f3017cb8067945dd511f..bbf8b8292ff3855cfe42317e38aa7f94c6451106 100644 --- a/core/modules/views/tests/src/Unit/Plugin/Block/ViewsBlockTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/Block/ViewsBlockTest.php @@ -60,7 +60,7 @@ class ViewsBlockTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { - // TODO: Change the autogenerated stub. + // @todo Change the autogenerated stub. parent::setUp(); $condition_plugin_manager = $this->createMock('Drupal\Core\Executable\ExecutableManagerInterface'); $condition_plugin_manager->expects($this->any()) diff --git a/core/modules/views/views.module b/core/modules/views/views.module index a85f945b4be9e71ded2735b8a711891178c0f48c..90cc66698f569d3bcc7c09124d2e6901a71f8359 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -169,7 +169,7 @@ function views_theme($existing, $type, $theme, $path) { // 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? + // @todo Watchdog or exception? if (!isset($def['provider']) || !$module_handler->moduleExists($def['provider'])) { continue; } diff --git a/core/modules/views_ui/admin.inc b/core/modules/views_ui/admin.inc index 92f2d7d91d7a212e8512f4d76dc109f7047a2c85..2bff41b07c78eb63092866a0e9f1d3551f1efbc0 100644 --- a/core/modules/views_ui/admin.inc +++ b/core/modules/views_ui/admin.inc @@ -253,7 +253,7 @@ function views_ui_standard_display_dropdown(&$form, FormStateInterface $form_sta $form['override']['dropdown'] = [ '#type' => 'select', - // @TODO: Translators may need more context than this. + // @todo Translators may need more context than this. '#title' => t('For'), '#options' => $display_dropdown, ]; diff --git a/core/modules/views_ui/src/ViewEditForm.php b/core/modules/views_ui/src/ViewEditForm.php index 93dc5c88984d6cfa4a9210cf33b7dda450208cf5..295452ef32427659629a08afcce3c0b77d393f07 100644 --- a/core/modules/views_ui/src/ViewEditForm.php +++ b/core/modules/views_ui/src/ViewEditForm.php @@ -331,7 +331,7 @@ public function save(array $form, FormStateInterface $form_state) { } $view->set('display', $displays); - // @todo: Revisit this when https://www.drupal.org/node/1668866 is in. + // @todo Revisit this when https://www.drupal.org/node/1668866 is in. $query = $this->requestStack->getCurrentRequest()->query; $destination = $query->get('destination'); @@ -387,7 +387,7 @@ public function getDisplayTab($view) { // If the plugin doesn't exist, display an error message instead of an edit // page. if (empty($display)) { - // @TODO: Improved UX for the case where a plugin is missing. + // @todo Improved UX for the case where a plugin is missing. $build['#markup'] = $this->t("Error: Display @display refers to a plugin named '@plugin', but that plugin is not available.", ['@display' => $display->display['id'], '@plugin' => $display->display['display_plugin']]); } // Build the content of the edit page. @@ -429,7 +429,7 @@ public function getDisplayDetails($view, $display) { $is_display_deleted = !empty($display['deleted']); // The default display cannot be duplicated. $is_default = $display['id'] == 'default'; - // @todo: Figure out why getOption doesn't work here. + // @todo Figure out why getOption doesn't work here. $is_enabled = $view->getExecutable()->displayHandlers->get($display['id'])->isEnabled(); if ($display['id'] != 'default') { @@ -1022,7 +1022,7 @@ public function getFormBucket(ViewUI $view, $type, $display) { // The rearrange form for filters contains the and/or UI, so override // the used path. $rearrange_url = Url::fromRoute('views_ui.form_rearrange_filter', ['js' => 'nojs', 'view' => $view->id(), 'display_id' => $display['id']]); - // TODO: Add another class to have another symbol for filter rearrange. + // @todo Add another class to have another symbol for filter rearrange. $class = 'icon compact rearrange'; break; diff --git a/core/modules/views_ui/src/ViewUI.php b/core/modules/views_ui/src/ViewUI.php index ab6c3d1ac375af536897b315a72fe517556e6798..2e427d250d7ff373c01ae08252cabb2707fbfd03 100644 --- a/core/modules/views_ui/src/ViewUI.php +++ b/core/modules/views_ui/src/ViewUI.php @@ -286,8 +286,8 @@ public function standardCancel($form, FormStateInterface $form_state) { * This will also provide a hidden op operator because the forms plugin * doesn't seem to properly provide which button was clicked. * - * TODO: Is the hidden op operator still here somewhere, or is that part of the - * docblock outdated? + * @todo Is the hidden op operator still here somewhere, or is that part of + * the docblock outdated? */ public function getStandardButtons(&$form, FormStateInterface $form_state, $form_id, $name = NULL) { $form['actions'] = [ diff --git a/core/modules/views_ui/views_ui.module b/core/modules/views_ui/views_ui.module index ff90c1639a8c2ffc76fa873958a9bb311d4e843c..e13a08d24f82842d9634b67d9fdb72f947d85e1d 100644 --- a/core/modules/views_ui/views_ui.module +++ b/core/modules/views_ui/views_ui.module @@ -170,9 +170,9 @@ function views_ui_theme_suggestions_views_ui_view_preview_section(array $variabl /** * Returns contextual links for each handler of a certain section. * - * @TODO - * Bring in relationships - * Refactor this function to use much stuff of views_ui_edit_form_get_bucket. + * @todo Bring in relationships. + * @todo Refactor this function to use much stuff of + * views_ui_edit_form_get_bucket. * * @param $title * Add a bolded title of this section. diff --git a/core/modules/views_ui/views_ui.theme.inc b/core/modules/views_ui/views_ui.theme.inc index 88ab2d0c2b1e2a41930e5e150389ec2d69f63a4f..e94e38e802759d35a056fb96d44e01b81298d93e 100644 --- a/core/modules/views_ui/views_ui.theme.inc +++ b/core/modules/views_ui/views_ui.theme.inc @@ -534,12 +534,12 @@ function template_preprocess_views_ui_view_preview_section(&$variables) { break; case 'attachment_before': - // @todo: Add links to the attachment configuration page. + // @todo Add links to the attachment configuration page. $variables['title'] = t('Attachment before'); break; case 'attachment_after': - // @todo: Add links to the attachment configuration page. + // @todo Add links to the attachment configuration page. $variables['title'] = t('Attachment after'); break; } diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist index 00205148bc0332ae1a59ff15bc696af4d5f08074..5af8cb248eefeee3570e142cc8f529c2f921ba57 100644 --- a/core/phpcs.xml.dist +++ b/core/phpcs.xml.dist @@ -83,6 +83,7 @@ </rule> <rule ref="Drupal.Commenting.InlineVariableComment"/> <rule ref="Drupal.Commenting.PostStatementComment"/> + <rule ref="Drupal.Commenting.TodoComment" /> <rule ref="Drupal.Commenting.VariableComment"> <!-- Sniff for: DuplicateVar, EmptyVar, InlineVariableName, WrongStyle --> <exclude name="Drupal.Commenting.VariableComment.IncorrectVarType"/> diff --git a/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryFrontPagePerformanceTest.php b/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryFrontPagePerformanceTest.php index a0f24a8ed495f7295b2ed9eeb2c3a9a9c0a2f416..108e09ec30c0d9ee3c5ac187adbefe270610d1bd 100644 --- a/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryFrontPagePerformanceTest.php +++ b/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryFrontPagePerformanceTest.php @@ -24,9 +24,9 @@ class OpenTelemetryFrontPagePerformanceTest extends PerformanceTestBase { * Logs front page tracing data with a cold cache. */ public function testFrontPageColdCache() { - // @todo: Chromedriver doesn't collect tracing performance logs for the very - // first request in a test, so warm it up. - // See https://www.drupal.org/project/drupal/issues/3379750 + // @todo Chromedriver doesn't collect tracing performance logs for the very + // first request in a test, so warm it up. + // https://www.drupal.org/project/drupal/issues/3379750 $this->drupalGet('user/login'); $this->rebuildAll(); $this->collectPerformanceData(function () { diff --git a/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryNodePagePerformanceTest.php b/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryNodePagePerformanceTest.php index 837a79c7016426cb19db3a6ab4caf7d37c82e3bd..5c0c85636527dc1e4e7edfdef5e5d6acc00a140f 100644 --- a/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryNodePagePerformanceTest.php +++ b/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryNodePagePerformanceTest.php @@ -24,9 +24,9 @@ class OpenTelemetryNodePagePerformanceTest extends PerformanceTestBase { * Logs node page tracing data with a cold cache. */ public function testNodePageColdCache() { - // @todo: Chromedriver doesn't collect tracing performance logs for the very - // first request in a test, so warm it up. - // See https://www.drupal.org/project/drupal/issues/3379750 + // @todo Chromedriver doesn't collect tracing performance logs for the very + // first request in a test, so warm it up. + // https://www.drupal.org/project/drupal/issues/3379750 $this->drupalGet('user/login'); $this->rebuildAll(); $this->collectPerformanceData(function () { diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php index e826945032769f16f78bf59e3c65748f90247bd1..736f8351c69fb3fc4da7731073df5a35a41c9206 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php @@ -139,7 +139,7 @@ public function testAjaxCommands() { }; JS; $session->executeScript($test_settings_command); - // @todo: Replace after https://www.drupal.org/project/drupal/issues/2616184 + // @todo Replace after https://www.drupal.org/project/drupal/issues/2616184 $session->executeScript('window.jQuery("#edit-settings-command-example").mousedown();'); $this->assertWaitPageContains('<div class="test-settings-command">42</div>'); } diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigTestBase.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigTestBase.php index 44347c66872327d24b50669f26e521284d7e19ca..e3d42fe68f03c99df1c77d3adc77d10ec820e199 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigTestBase.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigTestBase.php @@ -22,7 +22,7 @@ abstract class InstallerExistingConfigTestBase extends InstallerTestBase { protected $profile = NULL; /** - * @todo + * @todo Fill out docblock. */ protected $existingSyncDirectory = FALSE; diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeResourceTestBase.php b/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeResourceTestBase.php index 3af62d1121629b4824961e12fcfdb6f67820e916..9debde16b9389945b2f1352db1f65fae624bd9d1 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeResourceTestBase.php +++ b/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeResourceTestBase.php @@ -12,7 +12,7 @@ abstract class EntityFormModeResourceTestBase extends ConfigEntityResourceTestBa /** * {@inheritdoc} * - * @todo: Remove 'field_ui' when https://www.drupal.org/node/2867266. + * @todo Remove 'field_ui' when https://www.drupal.org/node/2867266. */ protected static $modules = ['user', 'field_ui']; diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeResourceTestBase.php b/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeResourceTestBase.php index 69b374732533acbd9ecfc593e79c8aa93df060cc..5f6d609b360240e96f3cb58cb6cc85b46121d9ea 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeResourceTestBase.php +++ b/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeResourceTestBase.php @@ -12,7 +12,7 @@ abstract class EntityViewModeResourceTestBase extends ConfigEntityResourceTestBa /** * {@inheritdoc} * - * @todo: Remove 'field_ui' when https://www.drupal.org/node/2867266. + * @todo Remove 'field_ui' when https://www.drupal.org/node/2867266. */ protected static $modules = ['user', 'field_ui']; diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigCRUDTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigCRUDTest.php index 1835a6f77303b14f22550b32d02a5d7d7cab690b..fec1d336a2e8fdf4f007d9c6611e2474ba83bdf2 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigCRUDTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigCRUDTest.php @@ -281,9 +281,9 @@ public function testDataTypes() { // Symfony 5.1's YAML parser issues a deprecation when reading octal with // a leading zero, to comply with YAML 1.2. However PECL YAML is still // YAML 1.1 compliant. - // @todo: revisit parsing of octal once PECL YAML supports YAML 1.2. - // See https://www.drupal.org/project/drupal/issues/3205480 - // 'octal' => 0775, + // @todo Revisit parsing of octal once PECL YAML supports YAML 1.2. + // https://www.drupal.org/project/drupal/issues/3205480 + // 'octal' => 0775, 'string' => 'string', 'string_int' => '1', 'nullable_array' => NULL, diff --git a/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php b/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php index 37bda0da403d38ec4cef6dedb2e2eae937fe347e..41566b3ba95a4cfd5003fa49b9dc8802e4dfb885 100644 --- a/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php +++ b/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php @@ -74,7 +74,7 @@ protected function getTestKernel(Request $request, ?array $modules_enabled = NUL * Tests DIC compilation. */ public function testCompileDIC() { - // @todo: write a memory based storage backend for testing. + // @todo Write a memory based storage backend for testing. $modules_enabled = [ 'system' => 'system', 'user' => 'user', @@ -178,7 +178,7 @@ public function testRepeatedBootWithDifferentEnvironment() { * Tests setting of site path after kernel boot. */ public function testPreventChangeOfSitePath() { - // @todo: write a memory based storage backend for testing. + // @todo Write a memory based storage backend for testing. $modules_enabled = [ 'system' => 'system', 'user' => 'user', diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php index 55d389d1350113091c539e2447f924b91858c31e..af8331e4663a4fefef270281965b34f8aadab25a 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php @@ -490,7 +490,7 @@ protected function doTestIntrospection($entity_type) { $this->assertEquals('string', $name_definition->getPropertyDefinition('value')->getDataType()); // Test introspecting an entity object. - // @todo: Add bundles and test bundles as well. + // @todo Add bundles and test bundles as well. $entity = $this->container->get('entity_type.manager') ->getStorage($entity_type) ->create(); @@ -604,8 +604,8 @@ protected function doTestDataStructureInterfaces($entity_type) { $strings = []; $this->getContainedStrings($entity->getTypedData(), 0, $strings); - // @todo: Once the user entity has defined properties this should contain - // the user name and other user entity strings as well. + // @todo Once the user entity has defined properties this should contain + // the user name and other user entity strings as well. $target_strings = [ $entity->uuid->value, 'en', diff --git a/core/tests/Drupal/KernelTests/Core/File/DirectoryTest.php b/core/tests/Drupal/KernelTests/Core/File/DirectoryTest.php index 7ee30c4d5687d0ec85ebc0cd298b8826195f4fea..d32a42343f42d7a7f5a0ff3bb36e10c3ab9367e4 100644 --- a/core/tests/Drupal/KernelTests/Core/File/DirectoryTest.php +++ b/core/tests/Drupal/KernelTests/Core/File/DirectoryTest.php @@ -135,7 +135,7 @@ public function testFileCreateNewFilepath() { $path = $file_system->createFilename($basename, $directory); $this->assertEquals($expected, $path, "Creating a new filepath from $path equals $original (expected $expected)."); - // @TODO: Finally we copy a file into a directory several times, to ensure a properly iterating filename suffix. + // @todo Finally we copy a file into a directory several times, to ensure a properly iterating filename suffix. } /** diff --git a/core/tests/Drupal/KernelTests/Core/File/FileCopyTest.php b/core/tests/Drupal/KernelTests/Core/File/FileCopyTest.php index 6724f93d122390ce27c77ed19165fc52c7eed114..18fa19a9fffb216d5f581e1a9ffd15b133bca489 100644 --- a/core/tests/Drupal/KernelTests/Core/File/FileCopyTest.php +++ b/core/tests/Drupal/KernelTests/Core/File/FileCopyTest.php @@ -43,8 +43,8 @@ public function testNormal() { $this->assertFileExists($newer_filepath); $this->assertFilePermissions($newer_filepath, Settings::get('file_chmod_file', FileSystem::CHMOD_FILE)); - // TODO: test copying to a directory (rather than full directory/file path) - // TODO: test copying normal files using normal paths (rather than only streams) + // @todo Test copying to a directory (rather than full directory/file path) + // @todo Test copying normal files using normal paths (rather than only streams) } /** diff --git a/core/tests/Drupal/KernelTests/Core/File/FileMoveTest.php b/core/tests/Drupal/KernelTests/Core/File/FileMoveTest.php index f30ee3cdce93576a474bb7150d71bcad8cea45f2..b4462006457f2a0de81ef6743a06e0c152227265 100644 --- a/core/tests/Drupal/KernelTests/Core/File/FileMoveTest.php +++ b/core/tests/Drupal/KernelTests/Core/File/FileMoveTest.php @@ -46,8 +46,8 @@ public function testNormal() { $this->assertFileDoesNotExist($new_filepath); $this->assertFilePermissions($newer_filepath, Settings::get('file_chmod_file', FileSystem::CHMOD_FILE)); - // TODO: test moving to a directory (rather than full directory/file path) - // TODO: test creating and moving normal files (rather than streams) + // @todo Test moving to a directory (rather than full directory/file path) + // @todo Test creating and moving normal files (rather than streams) } /** diff --git a/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php b/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php index 8b8fef9a2dc4a613aab77ae2958a01874671d1d3..bc69a3401343857586b2a173fa2c5b1a6f67ac12 100644 --- a/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php +++ b/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php @@ -270,7 +270,7 @@ public function testGetAndSet() { $typed_data = $this->createTypedData(['type' => 'duration_iso8601'], 'PT20S'); $this->assertInstanceOf(\DateInterval::class, $typed_data->getDuration()); $typed_data->setDuration(new \DateInterval('P40D')); - // @todo: Should we make this "nicer"? + // @todo Should we make this "nicer"? $this->assertEquals('P0Y0M40DT0H0M0S', $typed_data->getValue()); $typed_data->setValue(NULL); $this->assertNull($typed_data->getDuration()); diff --git a/core/tests/Drupal/Tests/Component/Serialization/JsonTest.php b/core/tests/Drupal/Tests/Component/Serialization/JsonTest.php index a48d7adb15c2d6b71679cda2116ff77693d974e4..d940543136bb297e5663aa42be81e53047e9cb9b 100644 --- a/core/tests/Drupal/Tests/Component/Serialization/JsonTest.php +++ b/core/tests/Drupal/Tests/Component/Serialization/JsonTest.php @@ -41,7 +41,7 @@ protected function setUp(): void { parent::setUp(); // Setup a string with the full ASCII table. - // @todo: Add tests for non-ASCII characters and Unicode. + // @todo Add tests for non-ASCII characters and Unicode. $this->string = ''; for ($i = 1; $i < 128; $i++) { $this->string .= chr($i); diff --git a/core/tests/Drupal/Tests/Component/Utility/UserAgentTest.php b/core/tests/Drupal/Tests/Component/Utility/UserAgentTest.php index 5a20f8df07908dd96ac040c05730303fd8129827..f0ee35429a696c22c8b4919b78e9ed55cb882d05 100644 --- a/core/tests/Drupal/Tests/Component/Utility/UserAgentTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/UserAgentTest.php @@ -156,9 +156,9 @@ public static function providerTestGetBestMatchingLangcode() { ['zh-tw, en-us;q=0.90, en;q=0.80, zh;q=0.70', 'zh-hant'], ['zh-hant, en-us;q=0.90, en;q=0.80, zh;q=0.70', 'zh-hant'], ['zh-hans, en-us;q=0.90, en;q=0.80, zh;q=0.70', 'zh-hans'], - // @todo: This is copied from RFC4647 but our regex skips the numbers so - // they where removed. Our code should be updated so private1-private2 is - // valid. http://tools.ietf.org/html/rfc4647#section-3.4 + // @todo This is copied from RFC4647 but our regex skips the numbers so + // they where removed. Our code should be updated so private1-private2 + // is valid. http://tools.ietf.org/html/rfc4647#section-3.4 ['zh-hant-CN-x-private-private, en-us;q=0.90, en;q=0.80, zh;q=0.70', 'zh-hant'], ['zh-cn', 'zh-hans'], ['zh-sg', 'zh-hans'], diff --git a/core/tests/Drupal/Tests/Core/Menu/LocalTaskIntegrationTestBase.php b/core/tests/Drupal/Tests/Core/Menu/LocalTaskIntegrationTestBase.php index afe1db28365e6cf095fe7b2380fdd64e96d0edb7..62175ac657ce6ac0d2f99ecb572e5e937976bb5b 100644 --- a/core/tests/Drupal/Tests/Core/Menu/LocalTaskIntegrationTestBase.php +++ b/core/tests/Drupal/Tests/Core/Menu/LocalTaskIntegrationTestBase.php @@ -67,7 +67,7 @@ protected function getLocalTaskManager($module_dirs, $route_name, $route_params) $property = new \ReflectionProperty('Drupal\Core\Menu\LocalTaskManager', 'argumentResolver'); $property->setValue($manager, $argumentResolver); - // todo mock a request with a route. + // @todo Mock a request with a route. $request_stack = new RequestStack(); $property = new \ReflectionProperty('Drupal\Core\Menu\LocalTaskManager', 'requestStack'); $property->setValue($manager, $request_stack); diff --git a/core/tests/Drupal/Tests/PerformanceTestTrait.php b/core/tests/Drupal/Tests/PerformanceTestTrait.php index 40e2c2695457d5737de2fbd4c977a084dcb85c90..3ebbf593ef647e4b07c5a2f001fd646dbcd0d0fb 100644 --- a/core/tests/Drupal/Tests/PerformanceTestTrait.php +++ b/core/tests/Drupal/Tests/PerformanceTestTrait.php @@ -421,7 +421,7 @@ private function collectNetworkData(array $messages, PerformanceData $performanc */ private function openTelemetryTracing(array $messages, string $service_name): void { // Open telemetry timestamps are always in nanoseconds. - // @todo: consider moving these to trait constants once we require PHP 8.2. + // @todo Consider moving these to trait constants once we require PHP 8.2. $nanoseconds_per_second = 1000_000_000; $nanoseconds_per_millisecond = 1000_000; $nanoseconds_per_microsecond = 1000; @@ -463,9 +463,9 @@ private function openTelemetryTracing(array $messages, string $service_name): vo $this->markTestSkipped('Incomplete log from chromedriver, giving up.'); } - // @todo: get commit hash from an environment variable and add this as an - // additional attribute. - // @see https://www.drupal.org/project/drupal/issues/3379761 + // @todo Get commit hash from an environment variable and add this as an + // additional attribute. + // @see https://www.drupal.org/project/drupal/issues/3379761 $resource = ResourceInfoFactory::defaultResource(); $resource = $resource->merge(ResourceInfo::create(Attributes::create([ ResourceAttributes::SERVICE_NAMESPACE => 'Drupal', diff --git a/core/themes/claro/claro.theme b/core/themes/claro/claro.theme index 11c0cad0c0b80cf0c4678face1a4488a8685640a..6100a9f0d0cfd4fdaab5723c5e55a364beed62f8 100644 --- a/core/themes/claro/claro.theme +++ b/core/themes/claro/claro.theme @@ -388,7 +388,7 @@ function claro_preprocess_details(&$variables) { // If the error is the same as the one in the multiple field widget element, // we have to avoid displaying it twice. Stark has this issue as well. - // @todo revisit when https://www.drupal.org/node/3084906 is fixed. + // @todo Revisit when https://www.drupal.org/node/3084906 is fixed. if (isset($element['#errors']) && isset($variables['errors']) && $element['#errors'] === $variables['errors']) { unset($variables['errors']); } @@ -542,7 +542,7 @@ function claro_preprocess_links(&$variables) { // This makes it so array keys of #links items are added as a class. This // functionality was removed in Drupal 8.1, but still necessary in some // instances. - // @todo remove in https://drupal.org/node/3120962 + // @todo Remove in https://drupal.org/node/3120962 if (!empty($variables['links'])) { foreach ($variables['links'] as $key => $value) { if (!is_numeric($key)) { @@ -739,9 +739,9 @@ function claro_form_media_form_alter(&$form, FormStateInterface $form_state) { // the contrib Media Entity 1.x branch. if (\Drupal::moduleHandler()->moduleExists('media') && $form_state->getFormObject() instanceof MediaForm) { // @todo Revisit after https://www.drupal.org/node/2892304 is in. It - // introduces a footer region to these forms which will allow for us to - // display a top border over the published checkbox by defining a - // media-edit-form.html.twig template the same way node does. + // introduces a footer region to these forms which will allow for us to + // display a top border over the published checkbox by defining a + // media-edit-form.html.twig template the same way node does. $form['#attached']['library'][] = 'claro/media-form'; } } @@ -750,7 +750,7 @@ function claro_form_media_form_alter(&$form, FormStateInterface $form_state) { * Implements hook_views_ui_display_top_alter(). */ function claro_views_ui_display_top_alter(&$element) { - // @todo remove this after https://www.drupal.org/node/3051605 has been + // @todo Remove this after https://www.drupal.org/node/3051605 has been // solved. $element['tabs']['#prefix'] = preg_replace('/(class="(.+\s)?)tabs(\s.+"|")/', '$1views-tabs$3', $element['tabs']['#prefix']); $element['tabs']['#prefix'] = preg_replace('/(class="(.+\s)?)secondary(\s.+"|")/', '$1views-tabs--secondary$3', $element['tabs']['#prefix']); @@ -804,7 +804,7 @@ function claro_views_ui_display_tab_alter(&$element) { // the Dropbutton type, we just have to set it's '#dropbutton_type' to // 'extrasmall'. // - // @todo: revisit after https://www.drupal.org/node/3057577 is fixed. + // @todo Revisit after https://www.drupal.org/node/3057577 is fixed. $dummy_dropbutton = &$element['details']['top']['actions']; if ($dummy_dropbutton) { @@ -1052,7 +1052,7 @@ function claro_preprocess_fieldset(&$variables) { // Remove 'container-inline' class from the main attributes and add a flag // instead. - // @todo remove this after https://www.drupal.org/node/3059593 has been + // @todo Remove this after https://www.drupal.org/node/3059593 has been // resolved. if (!empty($variables['attributes']['class'])) { $container_inline_key = array_search('container-inline', $variables['attributes']['class']); @@ -1148,7 +1148,7 @@ function claro_preprocess_filter_tips(&$variables) { function claro_preprocess_table(&$variables) { // Adding table sort indicator CSS class for inactive sort link. // @todo Revisit after https://www.drupal.org/node/3025726 or - // https://www.drupal.org/node/1973418 is in. + // https://www.drupal.org/node/1973418 is in. if (!empty($variables['header'])) { foreach ($variables['header'] as &$header_cell) { if ($header_cell['content'] instanceof Link) { @@ -1197,7 +1197,7 @@ function claro_preprocess_field_ui_table(&$variables) { * Implements template_preprocess_HOOK() for views_view_table. * * @todo Revisit after https://www.drupal.org/node/3025726 or - * https://www.drupal.org/node/1973418 is in. + * https://www.drupal.org/node/1973418 is in. */ function claro_preprocess_views_view_table(&$variables) { if (!empty($variables['header'])) { @@ -1387,8 +1387,8 @@ function claro_preprocess_file_widget_multiple(&$variables) { function claro_preprocess_image_widget(&$variables) { // This prevents image widget templates from rendering preview container HTML // to users that do not have permission to access these previews. - // @todo revisit in https://drupal.org/node/953034 - // @todo revisit in https://drupal.org/node/3114318 + // @todo Revisit in https://drupal.org/node/953034 + // @todo Revisit in https://drupal.org/node/3114318 if (isset($variables['data']['preview']['#access']) && $variables['data']['preview']['#access'] === FALSE) { unset($variables['data']['preview']); } @@ -1574,7 +1574,7 @@ function claro_preprocess_media_library_item__small(array &$variables) { /** * @todo Remove this when https://www.drupal.org/project/drupal/issues/2999549 - * lands. + * lands. * * @see \Drupal\media_library\Plugin\Field\FieldWidget\MediaLibraryWidget::formElement() */ @@ -1683,7 +1683,7 @@ function claro_form_views_ui_config_item_form_alter(array &$form, FormStateInter // whitespace and are no longer needed because uses of `float:` in this form // have been removed. // @todo Many of the changes to classes within this conditional may not be - // needed or require refactoring in https://drupal.org/node/3164890 + // needed or require refactoring in https://drupal.org/node/3164890 unset($form['options']['clear_markup_start']); unset($form['options']['clear_markup_end']); if (isset($form['options']['expose_button']['#prefix'])) {