Skip to content

MultipleClassFileToPsr4ClassesRector - Skipping non-namespaced classes #1422

@JanMikes

Description

@JanMikes

Hi!

In our project, we have few classes that are not namespaced and are in same file -> I wanted to split them, but found out, they are skipped, I am sure it is because of this condition:

// process only namespaced file
 if ($namespaceNodes === []) {
    return true;
}

What is reason these are skipped? Is it because of current implementation, because it is working with namespace nodes and it is missing?

If it is only reason, i could try to reimplement so it is possible to refactor non-namespaced classes as well.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions