Problem/Motivation

https://www.drupal.org/project/drupal/issues/3483899#comment-15841078

The docblock return type hint for HookCollectorPass::collectAllHookImplementations(): @return \Drupal\Core\Extension\HookCollectorPass has the wrong namespace. It probably should be @return $this. Is it worth its own issue?

Pretty sure this qualifies for novice.

Steps to reproduce

Look at docblock

Proposed resolution

The method is static and returns a new instance of the class, so it should be @return static

Remaining tasks

Fix it

User interface changes

N/A

Introduced terminology

N/A

API changes

N/A

Data model changes

N/A

Release notes snippet

N/A

Issue fork drupal-3485117

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

nicxvan created an issue. See original summary.

nexusnovaz’s picture

Assigned: Unassigned » nexusnovaz

I'll take a quick look at this

nexusnovaz’s picture

Assigned: nexusnovaz » Unassigned
Status: Active » Needs review

Hey, can MR !10040 please be reviewed. Pipelines had a couple of fails, but after a retest they were fine.

Thanks!

godotislate’s picture

Issue summary: View changes
Status: Needs review » Needs work

My original suggestion from #3483899: hook_module_implements_alter hook_cache_flush can only be procedural was incorrect. Change should be @return static.

nexusnovaz’s picture

Status: Needs work » Needs review

Hey,

Thanks for that. I wasn't too sure about the return type but also wasn't sure what the correct answer was. Thanks for the link to the coding standards for this issue too! Setting back to needs review before pipeline has run, but it should be good!

Thanks

godotislate’s picture

Status: Needs review » Reviewed & tested by the community

lgtm

  • catch committed b63f82bb on 11.1.x
    Issue #3485117 by nexusnovaz, godotislate, nicxvan: Fix return type on...

  • catch committed 2546cebc on 11.x
    Issue #3485117 by nexusnovaz, godotislate, nicxvan: Fix return type on...
catch’s picture

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

Commited/pushed to 11.x and cherry-picked to 11.1.x, thanks!

Status: Fixed » Closed (fixed)

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

nicxvan’s picture

Update credit