1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

Fix UnusedMethodCall examples

This commit is contained in:
Brown 2020-07-16 18:14:15 -04:00
parent c56e29b114
commit 5392ae0b39
2 changed files with 1 additions and 5 deletions

View File

@ -1955,10 +1955,6 @@ class ReflectorVisitor extends PhpParser\NodeVisitorAbstract implements PhpParse
if (isset($class_storage->properties[$property_name])
&& $class_storage->properties[$property_name]->type
&& ($class_storage->properties[$property_name]->type->isNullable()
|| $class_storage->properties[$property_name]->type->isFalsable()
|| $class_storage->properties[$property_name]->type->hasArray()
)
) {
$storage->mutation_free = true;
$storage->external_mutation_free = true;

View File

@ -880,7 +880,7 @@ class UnusedCodeTest extends TestCase
strlen("goodbye");',
'error_message' => 'UnusedFunctionCall',
],
'unusedMethodCall' => [
'unusedMethodCallSimple' => [
'<?php
final class A {
private string $foo;