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

Code formatting and arrangement


A PhpStorm cookbook author says, "Merely writing code does not make you a software engineering warrior—an engineer becomes a Ninja when the code works and the person on the adjacent seat can make some sense out of it."

People might argue over this statement's validity. But since there is a general trend among engineers to develop dissatisfaction from their jobs, it becomes quite important for you, the senior software developer in the team, to have control over the way the code is written. Of course, it is your responsibility!

How to do it…

  1. When you have got the determination to ensure that the written code has to be properly formatted, you need to select Code | Reformat Code from the main menu.

  2. Like always, there will be a pop-up window for you to make selections. Quite happily, you can do wonders with this pop-up window, which is shown in the following screenshot:

  3. The default selection will format the currently selected file. Perform the following steps to obtain...