Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment