1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-15 02:47:02 +01:00
psalm/docs/running_psalm/issues/PossiblyUnusedMethod.md
Matthew Brown 6d09418a23
Detect unused return values (#5917)
* Detect unused return values

* Allow static-returning instance methods (presumed to be fluent)

* Make $is_used the default for Codebase::methodExists
2021-06-10 14:18:15 -04:00

14 lines
253 B
Markdown

# PossiblyUnusedMethod
Emitted when `--find-dead-code` is turned on and Psalm cannot find any calls to a public or protected method.
```php
<?php
class A {
public function foo() : void {}
public function bar() : void {}
}
(new A)->foo();
```