mirror of
https://github.com/danog/psalm.git
synced 2024-12-02 09:37: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">
|
<errorLevel type="suppress">
|
||||||
<directory name="examples"/>
|
<directory name="examples"/>
|
||||||
</errorLevel>
|
</errorLevel>
|
||||||
<errorLevel type="info">
|
|
||||||
<directory name="src/Psalm/Type/Atomic"/>
|
|
||||||
</errorLevel>
|
|
||||||
</PossiblyUnusedParam>
|
</PossiblyUnusedParam>
|
||||||
|
|
||||||
<UnusedClass>
|
<UnusedClass>
|
||||||
|
@ -1706,12 +1706,13 @@ class ClassLikes
|
|||||||
&& !$classlike_storage->is_interface
|
&& !$classlike_storage->is_interface
|
||||||
) {
|
) {
|
||||||
foreach ($method_storage->params as $offset => $param_storage) {
|
foreach ($method_storage->params as $offset => $param_storage) {
|
||||||
if (!$this->file_reference_provider->isMethodParamUsed(
|
if (empty($classlike_storage->overridden_method_ids[$method_name])
|
||||||
strtolower((string) $method_id),
|
|
||||||
$offset
|
|
||||||
)
|
|
||||||
&& $param_storage->location
|
&& $param_storage->location
|
||||||
&& !$param_storage->promoted_property
|
&& !$param_storage->promoted_property
|
||||||
|
&& !$this->file_reference_provider->isMethodParamUsed(
|
||||||
|
strtolower((string) $method_id),
|
||||||
|
$offset
|
||||||
|
)
|
||||||
) {
|
) {
|
||||||
if ($method_storage->final) {
|
if ($method_storage->final) {
|
||||||
if (IssueBuffer::accepts(
|
if (IssueBuffer::accepts(
|
||||||
|
Loading…
Reference in New Issue
Block a user