From b8004807f5c8ccedbac27a2048f6a38378e47717 Mon Sep 17 00:00:00 2001
From: Lee Rowlands <lee.rowlands@previousnext.com.au>
Date: Fri, 10 Sep 2021 07:28:10 +1000
Subject: [PATCH] Issue #3231676 by daffie: [Symfony 6] Add various type hints
 to Drupal\Core\TypedData\Validation\RecursiveValidator::inContext() and
 ::startContext()

---
 .../Drupal/Core/TypedData/Validation/RecursiveValidator.php  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/core/lib/Drupal/Core/TypedData/Validation/RecursiveValidator.php b/core/lib/Drupal/Core/TypedData/Validation/RecursiveValidator.php
index a2671b2333fe..4dded17145f8 100644
--- a/core/lib/Drupal/Core/TypedData/Validation/RecursiveValidator.php
+++ b/core/lib/Drupal/Core/TypedData/Validation/RecursiveValidator.php
@@ -7,6 +7,7 @@
 use Symfony\Component\Validator\ConstraintValidatorFactoryInterface;
 use Symfony\Component\Validator\Context\ExecutionContextFactoryInterface;
 use Symfony\Component\Validator\Context\ExecutionContextInterface;
+use Symfony\Component\Validator\Validator\ContextualValidatorInterface;
 use Symfony\Component\Validator\Validator\ValidatorInterface;
 
 /**
@@ -51,14 +52,14 @@ public function __construct(ExecutionContextFactoryInterface $context_factory, C
   /**
    * {@inheritdoc}
    */
-  public function startContext($root = NULL) {
+  public function startContext($root = NULL): ContextualValidatorInterface {
     return new RecursiveContextualValidator($this->contextFactory->createContext($this, $root), $this, $this->constraintValidatorFactory, $this->typedDataManager);
   }
 
   /**
    * {@inheritdoc}
    */
-  public function inContext(ExecutionContextInterface $context) {
+  public function inContext(ExecutionContextInterface $context): ContextualValidatorInterface {
     return new RecursiveContextualValidator($context, $this, $this->constraintValidatorFactory, $this->typedDataManager);
   }
 
-- 
GitLab