diff --git a/core/lib/Drupal/Core/Config/Plugin/Validation/Constraint/LangcodeRequiredIfTranslatableValuesConstraintValidator.php b/core/lib/Drupal/Core/Config/Plugin/Validation/Constraint/LangcodeRequiredIfTranslatableValuesConstraintValidator.php
index b6b3dbe9e07d170f0881e1bed0331f048e71d64d..89a45e7b18dcd51501771691d2d894d750bd921a 100644
--- a/core/lib/Drupal/Core/Config/Plugin/Validation/Constraint/LangcodeRequiredIfTranslatableValuesConstraintValidator.php
+++ b/core/lib/Drupal/Core/Config/Plugin/Validation/Constraint/LangcodeRequiredIfTranslatableValuesConstraintValidator.php
@@ -17,7 +17,7 @@ final class LangcodeRequiredIfTranslatableValuesConstraintValidator extends Cons
   /**
    * {@inheritdoc}
    */
-  public function validate(mixed $value, Constraint $constraint) {
+  public function validate(mixed $value, Constraint $constraint): void {
     assert($constraint instanceof LangcodeRequiredIfTranslatableValuesConstraint);
 
     $mapping = $this->context->getObject();