Code Inspection: Unnecessary statement use
Reports the use
statements that contain non-fully qualified import names and thus have no effect.
Import names must be fully qualified. Note that for namespaced names (that is, FQNs containing the namespace separator, such as Foo\Bar
), using the leading backslash is not necessary and not recommended. For global names that do not contain the namespace separator, such as FooBar
, using the leading backslash is required.
See Using namespaces: Aliasing/Importing (php.net) for details.
Suppress an inspection in the editor
Position the caret at the highlighted line and press Alt+Enter or click .
Click the arrow next to the inspection you want to suppress and select the necessary suppress action.
Last modified: 16 July 2021