Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 599 Bytes

no_unused_imports.rst

File metadata and controls

32 lines (22 loc) · 599 Bytes

Rule no_unused_imports

Unused use statements must be removed.

Examples

Example #1

--- Original
+++ New
 <?php
 use \DateTime;
-use \Exception;

 new DateTime();

Rule sets

The rule is part of the following rule sets:

@PhpCsFixer
Using the @PhpCsFixer rule set will enable the no_unused_imports rule.
@Symfony
Using the @Symfony rule set will enable the no_unused_imports rule.