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:
parent
c56e29b114
commit
5392ae0b39
@ -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;
|
||||
|
@ -880,7 +880,7 @@ class UnusedCodeTest extends TestCase
|
||||
strlen("goodbye");',
|
||||
'error_message' => 'UnusedFunctionCall',
|
||||
],
|
||||
'unusedMethodCall' => [
|
||||
'unusedMethodCallSimple' => [
|
||||
'<?php
|
||||
final class A {
|
||||
private string $foo;
|
||||
|
Loading…
x
Reference in New Issue
Block a user