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

Finding the matching brace


If you embrace the brace, you will never be embarrassed.

Some PhpStorm Cookbook writer

Getting ready

Braces are an important element in programming. They not only define the boundary for the programmer, but also the interpreter. Both of you get to know the construct or from where to where the variable ranges. The PHP interpreter just needs to have a closing brace for every opening brace to proceed irrespective of how the code has been written. But the PHP interpreter is not powerful enough to write code for you—you have to do it yourself.

How to do it...

If you are provided with a small piece of code that is less than 100 lines long, you can somehow manage to read and maintain the code. If the line numbers exceed 100, code formatting comes to your rescue.

PhpStorm enables you to format all or some of the selected lines by simple mouse clicks or a single keyboard shortcut. To format code, you need to select Code | Reformat Code, and your code will be formatted like a...