diff --git a/core/lib/Drupal/Core/Config/Schema/Sequence.php b/core/lib/Drupal/Core/Config/Schema/Sequence.php index 43d3134..8ad81a7 100644 --- a/core/lib/Drupal/Core/Config/Schema/Sequence.php +++ b/core/lib/Drupal/Core/Config/Schema/Sequence.php @@ -70,6 +70,7 @@ public function get($index) { */ public function set($index, $value) { $this->offsetSet($index, $value); + return $this; } } diff --git a/core/lib/Drupal/Core/TypedData/ListInterface.php b/core/lib/Drupal/Core/TypedData/ListInterface.php index 6c6e5c3..3f8972b 100644 --- a/core/lib/Drupal/Core/TypedData/ListInterface.php +++ b/core/lib/Drupal/Core/TypedData/ListInterface.php @@ -64,7 +64,7 @@ public function get($index); * @param mixed * Item to be stored at the specified position. * - * @return self + * @return static * Returns the list. */ public function set($index, $item); diff --git a/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php b/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php index 8ee50fe..415ada8 100644 --- a/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php +++ b/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php @@ -125,6 +125,7 @@ public function set($index, $item) { $item = $item->getValue(); } $this->get($index)->setValue($item); + return $this; } else { throw new \InvalidArgumentException('Unable to set a value with a non-numeric delta in a list.');