mirror of
https://github.com/danog/psalm.git
synced 2024-11-29 20:28:59 +01:00
Only show possibly unused params on methods that don’t extend others
This commit is contained in:
parent
0df867cdff
commit
5b0e8bd1be
@ -67,9 +67,6 @@
|
||||
<errorLevel type="suppress">
|
||||
<directory name="examples"/>
|
||||
</errorLevel>
|
||||
<errorLevel type="info">
|
||||
<directory name="src/Psalm/Type/Atomic"/>
|
||||
</errorLevel>
|
||||
</PossiblyUnusedParam>
|
||||
|
||||
<UnusedClass>
|
||||
|
@ -1706,12 +1706,13 @@ class ClassLikes
|
||||
&& !$classlike_storage->is_interface
|
||||
) {
|
||||
foreach ($method_storage->params as $offset => $param_storage) {
|
||||
if (!$this->file_reference_provider->isMethodParamUsed(
|
||||
strtolower((string) $method_id),
|
||||
$offset
|
||||
)
|
||||
if (empty($classlike_storage->overridden_method_ids[$method_name])
|
||||
&& $param_storage->location
|
||||
&& !$param_storage->promoted_property
|
||||
&& !$this->file_reference_provider->isMethodParamUsed(
|
||||
strtolower((string) $method_id),
|
||||
$offset
|
||||
)
|
||||
) {
|
||||
if ($method_storage->final) {
|
||||
if (IssueBuffer::accepts(
|
||||
|
Loading…
Reference in New Issue
Block a user