From e14f65508172a0c37c0db256be73fcf58371867b Mon Sep 17 00:00:00 2001 From: Lee Rowlands <lee.rowlands@previousnext.com.au> Date: Sat, 18 Sep 2021 11:20:28 +1000 Subject: [PATCH] Issue #3231690 by daffie: [Symfony 6] Add type hints to Drupal\Core\TypedData\Validation\TypedDataMetadata::findConstraints(), ::getConstraints(), ::getTraversalStrategy() and ::getCascadingStrategy() --- .../Core/TypedData/Validation/TypedDataMetadata.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/lib/Drupal/Core/TypedData/Validation/TypedDataMetadata.php b/core/lib/Drupal/Core/TypedData/Validation/TypedDataMetadata.php index e878d20c98cb..2402b4cbbc00 100644 --- a/core/lib/Drupal/Core/TypedData/Validation/TypedDataMetadata.php +++ b/core/lib/Drupal/Core/TypedData/Validation/TypedDataMetadata.php @@ -34,28 +34,28 @@ public function __construct(TypedDataInterface $typed_data) { /** * {@inheritdoc} */ - public function findConstraints($group) { + public function findConstraints($group): array { return $this->getConstraints(); } /** * {@inheritdoc} */ - public function getConstraints() { + public function getConstraints(): array { return $this->typedData->getConstraints(); } /** * {@inheritdoc} */ - public function getTraversalStrategy() { + public function getTraversalStrategy(): int { return TraversalStrategy::NONE; } /** * {@inheritdoc} */ - public function getCascadingStrategy() { + public function getCascadingStrategy(): int { // By default, never cascade into validating referenced data structures. return CascadingStrategy::NONE; } -- GitLab