PHPCS/Psalm: Figure out how to reconcile $_unused_
var name prefixes in child classes with Psalm static analysis
#8956
Labels
category: devops
Features and tools supporting dev process.
focus: architecture
Product architecture and engineering best practices
priority: low
The issue/PR is low priority—not many people are affected or there’s a workaround, etc.
type: bug
The issue is a confirmed bug.
Description
While working on #8955 @timur27 found that using the suggested
$_unused_
prefix in child classes results in Psalm reporting an issue due to a parameter name mismatch (see #8955 (comment)).Expected behavior
You should be able to use the
$_unused_
prefix to explicitly mark function parameters as unused, even in child classes, without generating further errors during static analysis.Actual behavior
Psalm reports an issue due to a mismatch in parent function parameter names and the child implementation.
The text was updated successfully, but these errors were encountered: