Problem/Motivation

The annotation for ContentTranslationHandler::entityFormTitle is not documenting the return value.

Proposed resolution

Use the relevant description from \Drupal\Core\Entity\EntityInterface::label(), since this is just a wrapper around that task.

Remaining tasks

Patch coming.

User interface changes

N/A

API changes

N/A

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

snufkin created an issue. See original summary.

snufkin’s picture

Status: Active » Needs review
FileSize
733 bytes

Adding patch.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

snufkin’s picture

Version: 8.1.x-dev » 8.2.x-dev
eporama’s picture

Status: Needs review » Reviewed & tested by the community

This matches the @return value of Drupal\Core\Entity\EntityInterface::label() so I agree it should be what we get back.

Marking as RTBC.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

All the other @return docs in this file look correct. Committed aee92c5 and pushed to 8.1.x and 8.2.x. Thanks!

diff --git a/core/modules/content_translation/src/ContentTranslationHandler.php b/core/modules/content_translation/src/ContentTranslationHandler.php
index c0541cf..6fd2254 100644
--- a/core/modules/content_translation/src/ContentTranslationHandler.php
+++ b/core/modules/content_translation/src/ContentTranslationHandler.php
@@ -696,6 +696,7 @@ function entityFormDeleteTranslation($form, FormStateInterface $form_state) {
    *
    * @param \Drupal\Core\Entity\EntityInterface $entity
    *   The entity whose form is being altered.
+   *
    * @return string|null
    *   The label of the entity, or NULL if there is no label defined.
    */

Added missing line on commit.

  • alexpott committed c28aa40 on 8.2.x
    Issue #2701769 by snufkin: Missing @return documentation from...

  • alexpott committed aee92c5 on 8.1.x
    Issue #2701769 by snufkin: Missing @return documentation from...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.