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
| Comment | File | Size | Author |
|---|
Issue fork drupal-3643108
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
Comment #3
quietone commentedComment #4
quietone commentedComment #5
needs-review-queue-bot commentedThe 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.
Comment #6
quietone commentedComment #7
smustgrave commentedSeems straightforward and well scoped. LGTM.