Book Image

PhpStorm Cookbook

By : Mukund Chaudhary
Book Image

PhpStorm Cookbook

By: Mukund Chaudhary

Overview of this book

Table of Contents (16 chapters)
PhpStorm Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Renaming elements


As the saying goes, change is inevitable; you must be ready for change, whatever the timeline might be. Engineers are negligent enough to commit mistakes while renaming—typographical errors, forgetting where to change, and so on. Don't worry, you can at least rest assured with PhpStorm at your disposal. What PhpStorm does is that it provides a refactoring system, in which you can make your change penetrate throughout the project, visible in one single step: The Refactoring Step. If you opt for refactoring, you have the freedom to do a number of refactoring tasks.

So, an addIngredient method can be easily written as addingredient at some point in code; toolTip can be written as tootLip, and so on. There might be five places in your code where you used the method addSalt, but when you changed the method signature of add, somehow you forgot and changed it in only four locations in your code base. Such petty mistakes can be safely termed as silly mistakes but might cause more...