diff --git a/core/lib/Drupal/Component/Utility/Timer.php b/core/lib/Drupal/Component/Utility/Timer.php
index 19c83922e4cb5b958afb6a65aaba69e58a0fd3ab..20f3b7af683b7ef29e80aeceeb3f722555199e03 100644
--- a/core/lib/Drupal/Component/Utility/Timer.php
+++ b/core/lib/Drupal/Component/Utility/Timer.php
@@ -9,6 +9,11 @@
  */
 class Timer {
 
+  /**
+   * An associative array of timers.
+   *
+   * @var array
+   */
   protected static $timers = [];
 
   /**
diff --git a/core/lib/Drupal/Core/Datetime/DateFormatter.php b/core/lib/Drupal/Core/Datetime/DateFormatter.php
index cafe4cab026d4594430b529e39bb84f9ebece557..4b4a54c24e98876134d3868b8a813834299a6e81 100644
--- a/core/lib/Drupal/Core/Datetime/DateFormatter.php
+++ b/core/lib/Drupal/Core/Datetime/DateFormatter.php
@@ -53,6 +53,11 @@ class DateFormatter implements DateFormatterInterface {
    */
   protected $requestStack;
 
+  /**
+   * The available date formats.
+   *
+   * @var array
+   */
   protected $dateFormats = [];
 
   /**
diff --git a/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityChangedConstraint.php b/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityChangedConstraint.php
index 9099d88b8a9745dfc85874550a45e06624cf388c..720190c178396606c753b587cdd934dea7c3b1a4 100644
--- a/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityChangedConstraint.php
+++ b/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityChangedConstraint.php
@@ -16,6 +16,9 @@
 )]
 class EntityChangedConstraint extends SymfonyConstraint {
 
+  /**
+   * The default violation message.
+   */
   public $message = 'The content has either been modified by another user, or you have already submitted modifications. As a result, your changes cannot be saved.';
 
 }
diff --git a/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityUntranslatableFieldsConstraint.php b/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityUntranslatableFieldsConstraint.php
index 726a549a3c4bfbdb76d5eac7318db83984e9d066..29ba9ee70f9ce107ddac874b6271673794c3e2eb 100644
--- a/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityUntranslatableFieldsConstraint.php
+++ b/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityUntranslatableFieldsConstraint.php
@@ -16,7 +16,14 @@
 )]
 class EntityUntranslatableFieldsConstraint extends SymfonyConstraint {
 
+  /**
+   * The message when updating a field but not the current revision.
+   */
   public $defaultRevisionMessage = 'Non-translatable fields can only be changed when updating the current revision.';
+
+  /**
+   * The message when updating a field but not the original language.
+   */
   public $defaultTranslationMessage = 'Non-translatable fields can only be changed when updating the original language.';
 
 }
diff --git a/core/lib/Drupal/Core/Recipe/ConfigConfigurator.php b/core/lib/Drupal/Core/Recipe/ConfigConfigurator.php
index ad837d5dc35cebd5e0efae3c3ee449993baa6494..710cba0f87a9df5b2a9afc46593963c7fcace3cb 100644
--- a/core/lib/Drupal/Core/Recipe/ConfigConfigurator.php
+++ b/core/lib/Drupal/Core/Recipe/ConfigConfigurator.php
@@ -14,8 +14,14 @@
  */
 final class ConfigConfigurator {
 
+  /**
+   * The configuration directory for the recipe.
+   */
   public readonly ?string $recipeConfigDirectory;
 
+  /**
+   * Indicates how the shipped and active config are compared.
+   */
   private readonly bool|array $strict;
 
   /**
diff --git a/core/lib/Drupal/Core/Recipe/RecipeInputFormTrait.php b/core/lib/Drupal/Core/Recipe/RecipeInputFormTrait.php
index 1fe9f6bf4878247be06edae89fb89ef3f64e51a4..5f8d8dd32d5ed0acf185bf85cb265d9ce3749970 100644
--- a/core/lib/Drupal/Core/Recipe/RecipeInputFormTrait.php
+++ b/core/lib/Drupal/Core/Recipe/RecipeInputFormTrait.php
@@ -64,7 +64,7 @@ protected function buildRecipeInputForm(Recipe $recipe): array {
        *
        * @var array
        */
-      // phpcs:ignore DrupalPractice.CodeAnalysis.VariableAnalysis.UnusedVariable
+      // phpcs:ignore DrupalPractice.CodeAnalysis.VariableAnalysis.UnusedVariable, Drupal.Commenting.VariableComment.Missing
       public array $form = [];
 
       /**
diff --git a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraint.php b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraint.php
index dde912716f87acb95bddd5777762058bab0c44fa..e4e270af73ad262c002d755c5090a18b0ec2f945 100644
--- a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraint.php
+++ b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraint.php
@@ -15,6 +15,9 @@
 )]
 class PrimitiveTypeConstraint extends SymfonyConstraint {
 
+  /**
+   * The default violation message.
+   */
   public $message = 'This value should be of the correct primitive type.';
 
 }
diff --git a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/UniqueFieldConstraint.php b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/UniqueFieldConstraint.php
index 23c7019bdcc1b8fbcd1ba96accaebffd8f6ff6b7..850bb49f62d997283257c67e001a52c7e474b831 100644
--- a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/UniqueFieldConstraint.php
+++ b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/UniqueFieldConstraint.php
@@ -15,6 +15,9 @@
 )]
 class UniqueFieldConstraint extends SymfonyConstraint {
 
+  /**
+   * The default violation message.
+   */
   public $message = 'A @entity_type with @field_name %value already exists.';
 
   /**
diff --git a/core/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraint.php b/core/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraint.php
index 360f20da2f84c9fb252cfcc7810a2e1fb9e4b42a..c4dc0a5d45fb6f666935bf4b5fe9c54c76f41b4d 100644
--- a/core/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraint.php
+++ b/core/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraint.php
@@ -15,8 +15,19 @@
 )]
 class ModerationStateConstraint extends SymfonyConstraint {
 
+  /**
+   * The default violation message.
+   */
   public $message = 'Invalid state transition from %from to %to';
+
+  /**
+   * The violation message when there is an invalid stated.
+   */
   public $invalidStateMessage = 'State %state does not exist on %workflow workflow';
+
+  /**
+   * The violation message when there is an invalid transition.
+   */
   public $invalidTransitionAccess = 'You do not have access to transition from %original_state to %new_state';
 
 }
diff --git a/core/modules/file/src/Plugin/Validation/Constraint/FileUriUnique.php b/core/modules/file/src/Plugin/Validation/Constraint/FileUriUnique.php
index fd2300a7ca188258687d798693f400baf6197c6e..f8004c1a115294666de2fba76786e789f5293432 100644
--- a/core/modules/file/src/Plugin/Validation/Constraint/FileUriUnique.php
+++ b/core/modules/file/src/Plugin/Validation/Constraint/FileUriUnique.php
@@ -16,6 +16,11 @@
 )]
 class FileUriUnique extends UniqueFieldConstraint {
 
+  /**
+   * The error message.
+   *
+   * @var string
+   */
   public $message = 'The file %value already exists. Enter a unique file URI.';
 
   /**
diff --git a/core/modules/link/src/Plugin/Validation/Constraint/LinkAccessConstraint.php b/core/modules/link/src/Plugin/Validation/Constraint/LinkAccessConstraint.php
index 739ebce3bac73e4d100da143bf8b640ba0d2b0dc..18fe46c4d55f0a2febb9b71a33eb562ca9088785 100644
--- a/core/modules/link/src/Plugin/Validation/Constraint/LinkAccessConstraint.php
+++ b/core/modules/link/src/Plugin/Validation/Constraint/LinkAccessConstraint.php
@@ -15,6 +15,11 @@
 )]
 class LinkAccessConstraint extends SymfonyConstraint {
 
+  /**
+   * The error message.
+   *
+   * @var string
+   */
   public $message = "The path '@uri' is inaccessible.";
 
 }
diff --git a/core/modules/link/src/Plugin/Validation/Constraint/LinkExternalProtocolsConstraint.php b/core/modules/link/src/Plugin/Validation/Constraint/LinkExternalProtocolsConstraint.php
index 398e8dc5b7ce885f9fb287ee9f8cccd086823601..bd383c0c4eb2cacd2c50c09406817067181df5a8 100644
--- a/core/modules/link/src/Plugin/Validation/Constraint/LinkExternalProtocolsConstraint.php
+++ b/core/modules/link/src/Plugin/Validation/Constraint/LinkExternalProtocolsConstraint.php
@@ -15,6 +15,11 @@
 )]
 class LinkExternalProtocolsConstraint extends SymfonyConstraint {
 
+  /**
+   * The error message.
+   *
+   * @var string
+   */
   public $message = "The path '@uri' is invalid.";
 
 }
diff --git a/core/modules/link/src/Plugin/Validation/Constraint/LinkNotExistingInternalConstraint.php b/core/modules/link/src/Plugin/Validation/Constraint/LinkNotExistingInternalConstraint.php
index f266b37a1d7f590158f3741d9e16b5c613ff934e..6d25cf00a25fe2a9822f4650b205d01cca4993af 100644
--- a/core/modules/link/src/Plugin/Validation/Constraint/LinkNotExistingInternalConstraint.php
+++ b/core/modules/link/src/Plugin/Validation/Constraint/LinkNotExistingInternalConstraint.php
@@ -15,6 +15,11 @@
 )]
 class LinkNotExistingInternalConstraint extends SymfonyConstraint {
 
+  /**
+   * The error message.
+   *
+   * @var string
+   */
   public $message = "The path '@uri' is invalid.";
 
 }
diff --git a/core/modules/link/src/Plugin/Validation/Constraint/LinkTypeConstraint.php b/core/modules/link/src/Plugin/Validation/Constraint/LinkTypeConstraint.php
index 38d5c6d4c3c21222ffd09e3b9366c255337d299a..83333afdaad2ba9afe75821ecdf8abf9a683e717 100644
--- a/core/modules/link/src/Plugin/Validation/Constraint/LinkTypeConstraint.php
+++ b/core/modules/link/src/Plugin/Validation/Constraint/LinkTypeConstraint.php
@@ -15,6 +15,11 @@
 )]
 class LinkTypeConstraint extends SymfonyConstraint {
 
+  /**
+   * The error message.
+   *
+   * @var string
+   */
   public $message = "The path '@uri' is invalid.";
 
 }
diff --git a/core/modules/menu_ui/src/Plugin/Validation/Constraint/MenuSettingsConstraint.php b/core/modules/menu_ui/src/Plugin/Validation/Constraint/MenuSettingsConstraint.php
index b1edc89626e96a02c2b9aba2f7f54191651f238a..117bdb69a0a16da92553a92e9bbafb722a219cf6 100644
--- a/core/modules/menu_ui/src/Plugin/Validation/Constraint/MenuSettingsConstraint.php
+++ b/core/modules/menu_ui/src/Plugin/Validation/Constraint/MenuSettingsConstraint.php
@@ -15,9 +15,24 @@
 )]
 class MenuSettingsConstraint extends SymfonyConstraint {
 
+  /**
+   * The default violation message.
+   */
   public $message = 'You can only change the menu settings for the <em>published</em> version of this content.';
+
+  /**
+   * The violation message when the weight cannot be changed.
+   */
   public $messageWeight = 'You can only change the menu link weight for the <em>published</em> version of this content.';
+
+  /**
+   * The violation message when changing the parent for a unpublished content.
+   */
   public $messageParent = 'You can only change the parent menu link for the <em>published</em> version of this content.';
+
+  /**
+   * The violation message when removing a menu link for unpublished content.
+   */
   public $messageRemove = 'You can only remove the menu link in the <em>published</em> version of this content.';
 
 }
diff --git a/core/modules/path/src/Plugin/Validation/Constraint/PathAliasConstraint.php b/core/modules/path/src/Plugin/Validation/Constraint/PathAliasConstraint.php
index c40860aafe011048c671298bff66b09b2b99ec5f..da92e7e35b11dbe01adc1a00eab66bebba50c54e 100644
--- a/core/modules/path/src/Plugin/Validation/Constraint/PathAliasConstraint.php
+++ b/core/modules/path/src/Plugin/Validation/Constraint/PathAliasConstraint.php
@@ -15,6 +15,9 @@
 )]
 class PathAliasConstraint extends SymfonyConstraint {
 
+  /**
+   * The default violation message.
+   */
   public $message = 'You can only change the URL alias for the <em>published</em> version of this content.';
 
 }
diff --git a/core/modules/user/src/Plugin/Validation/Constraint/UserMailUnique.php b/core/modules/user/src/Plugin/Validation/Constraint/UserMailUnique.php
index eb808902f8f6644638ccfa69c1885fe376d23753..92eb3809e58e735cfa1c10de66489a4eb69cf024 100644
--- a/core/modules/user/src/Plugin/Validation/Constraint/UserMailUnique.php
+++ b/core/modules/user/src/Plugin/Validation/Constraint/UserMailUnique.php
@@ -15,6 +15,9 @@
 )]
 class UserMailUnique extends UniqueFieldConstraint {
 
+  /**
+   * The default violation message.
+   */
   public $message = 'The email address %value is already taken.';
 
 }
diff --git a/core/modules/user/src/Plugin/Validation/Constraint/UserNameConstraint.php b/core/modules/user/src/Plugin/Validation/Constraint/UserNameConstraint.php
index babf6b6fd0773d8f47407a932426795f921cabee..f017147f5b69700fd36b7e93a3566c6067dea09b 100644
--- a/core/modules/user/src/Plugin/Validation/Constraint/UserNameConstraint.php
+++ b/core/modules/user/src/Plugin/Validation/Constraint/UserNameConstraint.php
@@ -15,11 +15,34 @@
 )]
 class UserNameConstraint extends SymfonyConstraint {
 
+  /**
+   * The violation message when there is no username.
+   */
   public $emptyMessage = 'You must enter a username.';
+
+  /**
+   * The violation message when the username begins with whitespace.
+   */
   public $spaceBeginMessage = 'The username cannot begin with a space.';
+
+  /**
+   * The violation message when the username ends with whitespace.
+   */
   public $spaceEndMessage = 'The username cannot end with a space.';
+
+  /**
+   * The violation message when the username has consecutive whitespace.
+   */
   public $multipleSpacesMessage = 'The username cannot contain multiple spaces in a row.';
+
+  /**
+   * The violation message when the username uses an invalid character.
+   */
   public $illegalMessage = 'The username contains an illegal character.';
+
+  /**
+   * The violation message when the username length exceeds the maximum allowed.
+   */
   public $tooLongMessage = 'The username %name is too long: it must be %max characters or less.';
 
 }
diff --git a/core/modules/user/src/Plugin/Validation/Constraint/UserNameUnique.php b/core/modules/user/src/Plugin/Validation/Constraint/UserNameUnique.php
index 3b52c8f6e45a68e311de11c11724f03bb5c42c7d..7484ecf4aefba95243467d922c84220e65912fee 100644
--- a/core/modules/user/src/Plugin/Validation/Constraint/UserNameUnique.php
+++ b/core/modules/user/src/Plugin/Validation/Constraint/UserNameUnique.php
@@ -15,6 +15,9 @@
 )]
 class UserNameUnique extends UniqueFieldConstraint {
 
+  /**
+   * The default violation message.
+   */
   public $message = 'The username %value is already taken.';
 
 }
diff --git a/core/modules/user/src/Plugin/views/filter/Name.php b/core/modules/user/src/Plugin/views/filter/Name.php
index a5ca2d40b767a848058fd5f7e9684f70fbf626b2..6d18d5f1560d3c6efa6d35332bfda71716418f26 100644
--- a/core/modules/user/src/Plugin/views/filter/Name.php
+++ b/core/modules/user/src/Plugin/views/filter/Name.php
@@ -16,6 +16,9 @@
 #[ViewsFilter("user_name")]
 class Name extends InOperator {
 
+  /**
+   * This filter is always considered multiple-valued.
+   */
   protected $alwaysMultiple = TRUE;
 
   /**
diff --git a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php
index ab4f399f72b0e0efce06f3a082d759ec41ee53ae..3279a33d6e534011a182eb384fd297eb2f996da7 100644
--- a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php
+++ b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php
@@ -55,8 +55,19 @@
  */
 abstract class ArgumentPluginBase extends HandlerBase implements CacheableDependencyInterface {
 
+  /**
+   * The validator to use.
+   */
   public $validator = NULL;
+
+  /**
+   * The name of the argument.
+   */
   public $argument = NULL;
+
+  /**
+   * The value for the argument.
+   */
   public $value = NULL;
 
   /**
diff --git a/core/modules/views/src/Plugin/views/argument/Formula.php b/core/modules/views/src/Plugin/views/argument/Formula.php
index 1bfc914d5ae960074c8df473177992cc073b08e3..3ffa4ac2b1ff9c79252e3e5e4d3e4e35bd6b9d17 100644
--- a/core/modules/views/src/Plugin/views/argument/Formula.php
+++ b/core/modules/views/src/Plugin/views/argument/Formula.php
@@ -21,6 +21,9 @@
 )]
 class Formula extends ArgumentPluginBase {
 
+  /**
+   * An appropriate SQL string for the DB type and field type.
+   */
   public $formula = NULL;
 
   /**
diff --git a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php
index 4b0e4d57fd446550923a03487cc9b28f9d373c26..c04abeccb1da603b3a09cfb76fe901d60b548ee2 100644
--- a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php
+++ b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php
@@ -78,6 +78,10 @@ abstract class FieldPluginBase extends HandlerBase implements FieldHandlerInterf
    */
   // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing
   public $field_alias = 'unknown';
+
+  /**
+   * An array of aliases.
+   */
   public $aliases = [];
 
   /**
diff --git a/core/modules/views/src/Plugin/views/filter/InOperator.php b/core/modules/views/src/Plugin/views/filter/InOperator.php
index 36089e05aec8a22a48ea7aef2509c4e5c87fc977..bde4e41c11d7e1cabb5beb75b838f6df697bfb47 100644
--- a/core/modules/views/src/Plugin/views/filter/InOperator.php
+++ b/core/modules/views/src/Plugin/views/filter/InOperator.php
@@ -22,6 +22,9 @@
 #[ViewsFilter("in_operator")]
 class InOperator extends FilterPluginBase implements FilterOperatorsInterface {
 
+  /**
+   * The default form type.
+   */
   protected $valueFormType = 'checkboxes';
 
   /**
diff --git a/core/modules/views/src/Plugin/views/filter/ManyToOne.php b/core/modules/views/src/Plugin/views/filter/ManyToOne.php
index f4049573b6acdd194370a0a3d8920da26cf6b105..c086dcb24c5abe80690db196fa46cd41d1103fde 100644
--- a/core/modules/views/src/Plugin/views/filter/ManyToOne.php
+++ b/core/modules/views/src/Plugin/views/filter/ManyToOne.php
@@ -106,6 +106,9 @@ public function operators() {
     return $operators;
   }
 
+  /**
+   * The default form type.
+   */
   protected $valueFormType = 'select';
 
   protected function valueForm(&$form, FormStateInterface $form_state) {
diff --git a/core/modules/views/src/Plugin/views/filter/NumericFilter.php b/core/modules/views/src/Plugin/views/filter/NumericFilter.php
index 1acda0990412bb3928ba6b7f10fe02978db486f2..7de7ddfb3a8d430c30d149a12ec2af2df6851126 100644
--- a/core/modules/views/src/Plugin/views/filter/NumericFilter.php
+++ b/core/modules/views/src/Plugin/views/filter/NumericFilter.php
@@ -13,6 +13,9 @@
 #[ViewsFilter("numeric")]
 class NumericFilter extends FilterPluginBase implements FilterOperatorsInterface {
 
+  /**
+   * Exposed filter options.
+   */
   protected $alwaysMultiple = TRUE;
 
   protected function defineOptions() {
diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist
index d7a66fe42aa4f00d37451c45569ceaaf82acde29..c50f67f2d5fd1cd4a6c48d65b227ffcae13c1bd4 100644
--- a/core/phpcs.xml.dist
+++ b/core/phpcs.xml.dist
@@ -89,9 +89,12 @@
   <rule ref="Drupal.Commenting.TodoComment" />
   <rule ref="Drupal.Commenting.VariableComment">
     <!-- Sniff for: DuplicateVar, EmptyVar, IncorrectVarType, InlineVariableName, WrongStyle -->
-    <exclude name="Drupal.Commenting.VariableComment.Missing"/>
     <exclude name="Drupal.Commenting.VariableComment.MissingVar"/>
   </rule>
+  <rule ref="Drupal.Commenting.VariableComment.Missing">
+    <exclude-pattern>./core/tests/*</exclude-pattern>
+    <exclude-pattern>./core/*/tests/*</exclude-pattern>
+  </rule>
   <rule ref="Drupal.ControlStructures.ControlSignature"/>
   <rule ref="Drupal.ControlStructures.ElseIf"/>
   <rule ref="Drupal.ControlStructures.InlineControlStructure"/>