The documentation in TableMappingInterface has grammatical errors and structural issues that make it confusing.

Current problematic text:

The return list is contains the entity field names, not database field
* (i.e. column) names

Problems:

  1. Grammar error: "is contains" should be "contains"
  2. The return description is mixed into the method description instead of being in the @return tag
  3. Missing article "the" before "database field"

Proposed solution:
Move the return description to the @return docblock tag:

@return A list of field names for the given table. Note these are entity field names, not database field (i.e. column) names. To get the mapping of specific entity field to database columns use ::getColumnNames().

This separates the return value documentation from the method description, fixes the grammar, and provides helpful cross-reference to ::getColumnNames().

Credit: Issue identified by chx

Issue fork drupal-3570447

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

thejimbirch created an issue. See original summary.

sujal kshatri made their first commit to this issue’s fork.

longwave made their first commit to this issue’s fork.

longwave’s picture

Status: Active » Reviewed & tested by the community

Thanks for working on this, and welcome to Drupal!

Made a minor fix to the formatting, but otherwise LGTM.

longwave changed the visibility of the branch 3570447-fix-documentation-grammar to hidden.

  • catch committed f651f975 on 11.x
    task: #3570447 Fix documentation grammar and structure in...

  • catch committed 101f4196 on main
    task: #3570447 Fix documentation grammar and structure in...
catch’s picture

Version: main » 11.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to main and 11.x, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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