Unverified Commit b8004807 authored by larowlan's avatar larowlan
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
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment