I can't remember exactly anymore what NetBeans has and has not, anyway PHPStorm allows you to generate getters and setters, or to extract a fragment of code into a separate method - the latter one is extremely helpful for refactoring poorly written spaghetti code. This function is quite intelligent, so it takes care of all the local variables and creates a proper method signature (so that the newly created method would take all the variables used by the code as arguments), etc.