From 59833538ee21caa5ad5d3fcfc236b041a078c9d7 Mon Sep 17 00:00:00 2001
From: Nathaniel Catchpole <catch@35733.no-reply.drupal.org>
Date: Fri, 15 Jun 2018 12:07:08 +0100
Subject: [PATCH] Issue #2978788 by eliclaggett, amateescu:
 \Drupal\Core\TypedData\TypedData::__construct() should type hint its
 $definition argument to DataDefinitionInterface

---
 core/lib/Drupal/Core/TypedData/TypedData.php | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/core/lib/Drupal/Core/TypedData/TypedData.php b/core/lib/Drupal/Core/TypedData/TypedData.php
index 243d48a92f6a..bc1702a70812 100644
--- a/core/lib/Drupal/Core/TypedData/TypedData.php
+++ b/core/lib/Drupal/Core/TypedData/TypedData.php
@@ -59,12 +59,8 @@ public static function createInstance($definition, $name = NULL, TraversableType
    *   root of a typed data tree. Defaults to NULL.
    *
    * @see \Drupal\Core\TypedData\TypedDataManager::create()
-   *
-   * @todo When \Drupal\Core\Config\TypedConfigManager has been fixed to use
-   *   class-based definitions, type-hint $definition to
-   *   DataDefinitionInterface. https://www.drupal.org/node/1928868
    */
-  public function __construct($definition, $name = NULL, TypedDataInterface $parent = NULL) {
+  public function __construct(DataDefinitionInterface $definition, $name = NULL, TypedDataInterface $parent = NULL) {
     $this->definition = $definition;
     $this->parent = $parent;
     $this->name = $name;
-- 
GitLab