Unused declaration
Reports the classes, methods, functions, constants, or properties that are not used or not reachable from entry points. It also reports all method implementations/overriders.
Some unused members might not be reported in the code editor on the fly. Due to performance reasons, a non-private member is checked only when its name rarely occurs in the project.
To see all results, run the inspection in batch mode by using Code | Inspect Code... or Code | Run Inspection by Name....
Inspection options
Option | Type | Default |
---|---|---|
TabSet | None | |
Members to Report | Tab | None |
Properties | Checkbox | true |
Dropdown | public | |
Methods | Checkbox | true |
Dropdown | public | |
Constants | Checkbox | true |
Dropdown | public | |
Classes | Checkbox | true |
Functions | Checkbox | true |
Magic methods | Checkbox | true |
Entry Points | Tab | None |
HorizontalStack | None | |
Custom | None | |
Custom | None | |
Suppress getters/setters | Checkbox | false |
Assume test declarations as entry points | Checkbox | true |
Dropdown | Show all declarations |
Inspection Details | |
---|---|
Available in: | PhpStorm 2023.3, Qodana for PHP 2023.3 |
Plugin: | PHP, 233.SNAPSHOT |