1.2.418. Empty Namespace¶
Declaring a namespace in the code and not using it for structure declarations or global instructions is useless.
Using simple style : Using bracket-style syntax :
<?php
namespace Y;
class foo {}
namespace X;
// This is useless
?>
1.2.418.1. Connex PHP features¶
1.2.418.1.1. Suggestions¶
Remove the namespace
Fill the namespace with some definition
1.2.418.1.2. Specs¶
Short name |
Namespaces/EmptyNamespace |
Rulesets |
|
Exakat since |
0.8.4 |
PHP Version |
All |
Severity |
Minor |
Time To Fix |
Instant (5 mins) |
Precision |
Very high |
ClearPHP |
|
Available in |