From 4be96530933657100c5054c22db3f30c5f30a165 Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Tue, 20 Oct 2020 17:43:11 +0100
Subject: [PATCH] Issue #3177765 by klausi: ListInterface::first() return value
 is documented wrong

(cherry picked from commit 7655860e434cdda59f8ce14de027e73319a005c4)
---
 core/lib/Drupal/Core/TypedData/ListInterface.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/lib/Drupal/Core/TypedData/ListInterface.php b/core/lib/Drupal/Core/TypedData/ListInterface.php
index 1dab39a0f71e..7e3e616d09d1 100644
--- a/core/lib/Drupal/Core/TypedData/ListInterface.php
+++ b/core/lib/Drupal/Core/TypedData/ListInterface.php
@@ -83,8 +83,8 @@ public function set($index, $value);
   /**
    * Returns the first item in this list.
    *
-   * @return \Drupal\Core\TypedData\TypedDataInterface
-   *   The first item in this list.
+   * @return \Drupal\Core\TypedData\TypedDataInterface|null
+   *   The first item in this list, or NULL if there are no items.
    *
    * @throws \Drupal\Core\TypedData\Exception\MissingDataException
    *   If the complex data structure is unset and no item can be created.
-- 
GitLab