Commit b12d11a4 authored by catch's avatar catch
Browse files

Issue #3231688 by daffie, longwave, Spokje, larowlan, Taran2L: [Symfony 6] Add...

Issue #3231688 by daffie, longwave, Spokje, larowlan, Taran2L: [Symfony 6] Add type hints to Drupal\Core\TypedData\Validation\ExecutionContext
parent a0e1956f
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintViolation;
use Symfony\Component\Validator\ConstraintViolationList;
use Symfony\Component\Validator\ConstraintViolationListInterface;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
use Symfony\Component\Validator\Mapping\MetadataInterface;
use Symfony\Component\Validator\Util\PropertyPath;
@@ -177,28 +178,28 @@ public function buildViolation($message, array $parameters = []): ConstraintViol
  /**
   * {@inheritdoc}
   */
  public function getViolations() {
  public function getViolations(): ConstraintViolationListInterface {
    return $this->violations;
  }

  /**
   * {@inheritdoc}
   */
  public function getValidator() {
  public function getValidator(): ValidatorInterface {
    return $this->validator;
  }

  /**
   * {@inheritdoc}
   */
  public function getRoot() {
  public function getRoot(): mixed {
    return $this->root;
  }

  /**
   * {@inheritdoc}
   */
  public function getValue() {
  public function getValue(): mixed {
    return $this->value;
  }

@@ -268,7 +269,7 @@ public function markConstraintAsValidated($cache_key, $constraint_hash) {
  /**
   * {@inheritdoc}
   */
  public function isConstraintValidated($cache_key, $constraint_hash) {
  public function isConstraintValidated($cache_key, $constraint_hash): bool {
    return isset($this->validatedConstraints[$cache_key . ':' . $constraint_hash]);
  }

@@ -289,7 +290,7 @@ public function markGroupAsValidated($cache_key, $group_hash) {
  /**
   * {@inheritdoc}
   */
  public function isGroupValidated($cache_key, $group_hash) {
  public function isGroupValidated($cache_key, $group_hash): bool {
    return isset($this->validatedObjects[$cache_key][$group_hash]);
  }

@@ -303,7 +304,7 @@ public function markObjectAsInitialized($cache_key) {
  /**
   * {@inheritdoc}
   */
  public function isObjectInitialized($cache_key) {
  public function isObjectInitialized($cache_key): bool {
    // Not supported, so nothing todo.
  }