Problem/Motivation

See #3455549: [meta] Add return typehints to protected test helper methods

This is to fix this item from the remaining tasks in the parent issue.

Add NodeInterface return typehints to protected test helper methods
Add Url return typehints to protected test helper methods
Add TermInterface return typehints to protected test helper methods
Add ContentEntityInterface return typehints to protected test helper methods

Steps to reproduce

Add this to phpcs.xml.dist

<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint">
  <include-pattern>*/tests/*</include-pattern>
</rule>

Run composer phpcbf

Grep the git diff output for changes that add : foo to protected or private methods:

git diff 11.x | grep -E "\+  (protected|private) function .*)\: foo"

where foo is ContentEntityInterface, TermInterface, Url, and NodeInterface

Proposed resolution

Add ContentEntityInterface, TermInterface, Url, and NodeInterface return type hints to protected test methods

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3643108

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

quietone created an issue. See original summary.

quietone’s picture

Status: Active » Needs review
Parent issue: » #3455549: [meta] Add return typehints to protected test helper methods
quietone’s picture

Title: Add 4 class return typehints to protected test helper methods » Add return typehints for 4 classes to protected test helper methods
Issue summary: View changes
needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new98 bytes

The Needs Review Queue Bot tested this issue. The merge request has merge conflicts and cannot be merged. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

quietone’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Seems straightforward and well scoped. LGTM.