PhpStorm
 
Get PhpStorm
You are viewing the documentation for an earlier version of PhpStorm.

Code Inspection: Fully qualified name usage

Last modified: 16 May 2022

Reports the fully qualified class names that can be shortened by adding the use statement.

By replacing fully qualified class names with import statements, you can avoid repetition of long namespaces and thus improve code readability. For more information, refer to Using namespaces: Aliasing/Importing (php.net).

In the following example, the usage of the \Foo\Bar\Baz fully qualified name is replaced with the use statement.