Convert namespaced files

Is there any way to convert a namespaced file and get use statements in dependency of the count? I want to convert all classes which are called more than two times to own use statements.

Or is there any way to simply search for a regular expression and group it by foundings?

Thanks!

Please sign in to leave a comment.