Unverified Commit b8004807 authored by Lee Rowlands's avatar Lee Rowlands
Browse files

Issue #3231676 by daffie: [Symfony 6] Add various type hints to...

Issue #3231676 by daffie: [Symfony 6] Add various type hints to Drupal\Core\TypedData\Validation\RecursiveValidator::inContext() and ::startContext()
parent 19594b91
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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);
  }