Skip to content

[6.x] Remove stale @param from wildcard() docblocks - #15119

Merged
jasonvarga merged 1 commit into
statamic:6.xfrom
darkdi:fix/wildcard-docblock-args
Aug 5, 2026
Merged

[6.x] Remove stale @param from wildcard() docblocks#15119
jasonvarga merged 1 commit into
statamic:6.xfrom
darkdi:fix/wildcard-docblock-args

Conversation

@darkdi

@darkdi darkdi commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Six wildcard() docblocks document a second parameter the method does not take.

Where Documented Actual
src/Tags/In.php:10 array $args wildcard($method)
src/Tags/Can.php:10 array $args wildcard($method)
src/Tags/Is.php:10 array $args wildcard($method)
src/Tags/Glide.php:22 array $args wildcard($method)
src/Tags/ParentTags.php:16 array $args wildcard($method)
src/Tags/Theme.php:13 array $arguments Unused wildcard($method)

Tags::__call() dispatches with a single argument:

return $this->{$this->wildcardMethod}($this->method);

and all 35 wildcard() implementations in src/ declare one parameter, so there
is nothing for the second tag to describe. Theme already carried the note
Unused on its copy.

Removed those six lines. Comments only — no signature, call site, or behaviour is
touched, so no test covers it.


While looking at this I noticed a further 21 @param tags elsewhere in src/
whose names don't match their signatures — mostly parameters that were renamed
(Support/Arr.php removeNullValues, Assets/AssetFolder.php rename,
Console/Processes/Process.php withoutLoggingErrors, and others). They're a
different kind of change from this one, so I left them out. Happy to send them
separately if you want them.

wildcard() takes only the tag part. Tags::__call() invokes it with that
single argument, and all 35 implementations declare one parameter, so the
documented $args/$arguments has nowhere to come from. Theme already noted
its copy as "Unused".
@darkdi darkdi changed the title Remove stale @param from wildcard() docblocks [6.x] Remove stale @param from wildcard() docblocks Aug 4, 2026
@jasonvarga
jasonvarga merged commit 1e8c49d into statamic:6.x Aug 5, 2026
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants