Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does renaming of files sometimes refactor the classnames and sometimes not?

I found it curious that the file rename sometimes ask to refactor the class inside and (most) sometimes just renames the files.

like image 409
sra Avatar asked May 10 '11 12:05

sra


2 Answers

I think the class name has to match the filename exactly. It may also depend on whether your code compiles at the time, though not sure on that point.

like image 133
AndrewS Avatar answered Oct 07 '22 00:10

AndrewS


In addition to what AndrewS said, I belive that if you have multiple classes in a single file, it will also not ask to refactor it.

like image 22
Alex Mendez Avatar answered Oct 07 '22 00:10

Alex Mendez