From 097b83f98f8c72a447e71d605eb531239ad6a871 Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Wed, 18 Feb 2015 15:21:41 +0000
Subject: [PATCH] Issue #2417339 by amateescu, shashikant_chauhan: Fix @return
 documentation for EntityManagerInterface::loadEntityByConfigTarget()

---
 core/includes/entity.inc                                 | 2 +-
 .../Core/Config/Entity/ConfigEntityStorageInterface.php  | 2 +-
 core/lib/Drupal/Core/Entity/Entity.php                   | 5 +++--
 core/lib/Drupal/Core/Entity/EntityManagerInterface.php   | 9 +++++----
 core/lib/Drupal/Core/Entity/EntityStorageInterface.php   | 2 +-
 5 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/core/includes/entity.inc b/core/includes/entity.inc
index 0a8f7bad49fc..0ecb405a84cd 100644
--- a/core/includes/entity.inc
+++ b/core/includes/entity.inc
@@ -182,7 +182,7 @@ function entity_load_multiple($entity_type, array $ids = NULL, $reset = FALSE) {
  *
  * @return array
  *   An array of entity objects indexed by their IDs. Returns an empty array if
- *   no matching entities found.
+ *   no matching entities are found.
  */
 function entity_load_multiple_by_properties($entity_type, array $values) {
   return \Drupal::entityManager()
diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorageInterface.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorageInterface.php
index 78d86df7c117..8bb9e43cb344 100644
--- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorageInterface.php
+++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorageInterface.php
@@ -84,7 +84,7 @@ public function loadOverrideFree($id);
    *
    * @return \Drupal\Core\Entity\EntityInterface[]
    *   An array of entity objects indexed by their IDs. Returns an empty array
-   *   if no matching entities found.
+   *   if no matching entities are found.
    */
   public function loadMultipleOverrideFree(array $ids = NULL);
 
diff --git a/core/lib/Drupal/Core/Entity/Entity.php b/core/lib/Drupal/Core/Entity/Entity.php
index 64761a9a1246..455607e9adff 100644
--- a/core/lib/Drupal/Core/Entity/Entity.php
+++ b/core/lib/Drupal/Core/Entity/Entity.php
@@ -437,7 +437,7 @@ public function getCacheTags() {
   /**
    * {@inheritdoc}
    *
-   * @return static
+   * @return static|null
    *   The entity object or NULL if there is no entity with the given ID.
    */
   public static function load($id) {
@@ -449,7 +449,8 @@ public static function load($id) {
    * {@inheritdoc}
    *
    * @return static[]
-   *   An array of entity objects indexed by their IDs.
+   *   An array of entity objects indexed by their IDs. Returns an empty array
+   *   if no matching entities are found.
    */
   public static function loadMultiple(array $ids = NULL) {
     $entity_manager = \Drupal::entityManager();
diff --git a/core/lib/Drupal/Core/Entity/EntityManagerInterface.php b/core/lib/Drupal/Core/Entity/EntityManagerInterface.php
index f1e692115287..d1609900a0c8 100644
--- a/core/lib/Drupal/Core/Entity/EntityManagerInterface.php
+++ b/core/lib/Drupal/Core/Entity/EntityManagerInterface.php
@@ -461,8 +461,8 @@ public function getFormModeOptions($entity_type_id, $include_disabled = FALSE);
    * @param string $uuid
    *   The UUID of the entity to load.
    *
-   * @return \Drupal\Core\Entity\EntityInterface|FALSE
-   *   The entity object, or FALSE if there is no entity with the given UUID.
+   * @return \Drupal\Core\Entity\EntityInterface|null
+   *   The entity object, or NULL if there is no entity with the given UUID.
    *
    * @throws \Drupal\Core\Entity\EntityStorageException
    *   Thrown in case the requested entity type does not support UUIDs.
@@ -478,8 +478,9 @@ public function loadEntityByUuid($entity_type_id, $uuid);
    *   The configuration target to load, as returned from
    *   \Drupal\Core\Entity\EntityInterface::getConfigTarget().
    *
-   * @return \Drupal\Core\Entity\EntityInterface|FALSE
-   *   The entity object, or FALSE if there is no entity with the given UUID.
+   * @return \Drupal\Core\Entity\EntityInterface|null
+   *   The entity object, or NULL if there is no entity with the given config
+   *   target identifier.
    *
    * @throws \Drupal\Core\Entity\EntityStorageException
    *   Thrown if the target identifier is a UUID but the entity type does not
diff --git a/core/lib/Drupal/Core/Entity/EntityStorageInterface.php b/core/lib/Drupal/Core/Entity/EntityStorageInterface.php
index 387e0fbd2678..17a264bd44e5 100644
--- a/core/lib/Drupal/Core/Entity/EntityStorageInterface.php
+++ b/core/lib/Drupal/Core/Entity/EntityStorageInterface.php
@@ -47,7 +47,7 @@ public function resetCache(array $ids = NULL);
    *
    * @return \Drupal\Core\Entity\EntityInterface[]
    *   An array of entity objects indexed by their IDs. Returns an empty array
-   *   if no matching entities found.
+   *   if no matching entities are found.
    */
   public function loadMultiple(array $ids = NULL);
 
-- 
GitLab