Skip to content

[CodingStyle] \Rector\CodingStyle\Rector\Namespace_\ImportFullyQualifiedNamesRector : add an option to skip "root namespace" classes (like \Throwable or \DateTime) #1911

@gnutix

Description

@gnutix

Diff

Currently, when running the coding-style level, you will get changes like this :

--- Original
+++ New
@@ -4,6 +4,8 @@

 namespace ...;

+use Throwable;
@@ -280,7 +282,7 @@
             }

             return new Response(...);
-        } catch (\Throwable $throwable) {
+        } catch (Throwable $throwable) {

It would be nice to have an option to disable this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions