Unverified Commit 2eb9e5f9 authored by Lee Rowlands's avatar Lee Rowlands
Browse files

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

Issue #3231689 by daffie: [Symfony 6] Add type hints to Drupal\Core\TypedData\Validation\ExecutionContext::getObject(), ::getMetadata(), ::getGroup(), ::getClassName(), ::getPropertyName() and ::getPropertyPath()
parent 1b900151
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -206,42 +206,42 @@ public function getValue(): mixed {
  /**
   * {@inheritdoc}
   */
  public function getObject() {
  public function getObject(): ?object {
    return $this->data;
  }

  /**
   * {@inheritdoc}
   */
  public function getMetadata() {
  public function getMetadata(): ?MetadataInterface {
    return $this->metadata;
  }

  /**
   * {@inheritdoc}
   */
  public function getGroup() {
  public function getGroup(): ?string {
    return Constraint::DEFAULT_GROUP;
  }

  /**
   * {@inheritdoc}
   */
  public function getClassName() {
  public function getClassName(): ?string {
    return get_class($this->data);
  }

  /**
   * {@inheritdoc}
   */
  public function getPropertyName() {
  public function getPropertyName(): ?string {
    return $this->data->getName();
  }

  /**
   * {@inheritdoc}
   */
  public function getPropertyPath($sub_path = '') {
  public function getPropertyPath($sub_path = ''): string {
    return PropertyPath::append($this->propertyPath, $sub_path);
  }