Closed (fixed)
Project:
Coder
Version:
9.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
24 Feb 2026 at 09:12 UTC
Updated:
27 Mar 2026 at 17:45 UTC
Jump to comment: Most recent
From #3575324: Add return type documentation to ResourceTestBase
We want to add @return void to inform humans and PHPStan that a method should not return a value, but we cannot add an actual return type yet because downstream code needs to update first.
However, just adding @return void results in MissingReturnComment from FunctionCommentSniff: "Description for the @return value is missing", so we need to add a somewhat pointless description of "Returns nothing."
Allow a missing description if the @return type is void.
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 #2
klausiHm, I think you should not document return void, right? The coding standards say "Functions without return values must not have @return documentation.". https://project.pages.drupalcode.org/coding_standards/php/documentation/...
Ah I see, you want to do it for PHPStan ... I agree that the coding standards sentence does not make sense anyway, let people document that a functions returns void, by all means.
So I think we can do this!
Comment #3
longwaveThis will also help with #3486376: Extend Symfony DebugClassLoader to report missing cross-module @return types where
@return voidin core will notify modules that they should add void return types and that core intends to in the future.Comment #6
klausiMerged, thanks for reporting!
I'm not planning to release this on Coder 8, let me know if you need it there. But I think Drupal core can just upgrade to Coder 9.
I'm also planning to release Coder 9.0 soon.
Comment #8
klausiActually released Coder 9.0.0 now - happy upgrading!