1.2.1284. Unresolved Use¶
The following use instructions cannot be resolved to a known class, interface, trait, constant or function. They should be dropped or fixed.
A known class, interface, trait, constant or function is defined in PHP (standard), an extension, a stub or the current code. Use expression are options for the current namespace.
<?php
namespace A {
// class B is defined
class B {}
// class C is not defined
}
namespace X/Y {
use A/B; // This use is valid
use A/C; // This use point to nothing.
new B();
new C();
}
?>
See also Using namespaces: Aliasing/Importing.
1.2.1284.1. Connex PHP features¶
1.2.1284.1.1. Suggestions¶
Remove the use expression
Fix the use expression
1.2.1284.1.2. Specs¶
Short name |
Namespaces/UnresolvedUse |
Rulesets |
|
Exakat since |
0.8.4 |
PHP Version |
All |
Severity |
Major |
Time To Fix |
Slow (1 hour) |
Precision |
High |
ClearPHP |
|
Available in |