Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying PhpStorm Cookbook
  • Table Of Contents Toc
PhpStorm Cookbook

PhpStorm Cookbook

By : Chaudhary
1 (2)
close
close
PhpStorm Cookbook

PhpStorm Cookbook

1 (2)
By: Chaudhary

Overview of this book

If you are a competent PHP developer who knows the basics of PHPStorm and intends to gain better knowledge of PHPStorm by learning and implementing pro-level practices, techniques, and solutions, then this book is for you. It is assumed that you already have a working installation of the software setup.
Table of Contents (11 chapters)
close
close
10
Index

Moving a method


There are two prerequisites to moving a method to some other class. One is the most common prerequisite: you should be clear about what you are doing. The other is that the method to be moved must be static. If it is not, PhpStorm will alert you by saying Move non-static method is not supported.

How to do it...

To move the method, perform the following steps:

  1. Just place the cursor over the method name, and access the Refactor option from the right-click context menu and move.

  2. You need to provide the name of the target class where you wish to move this method.

  3. You have the option to preview which occurrences will be affected by this change (movement).

  4. Once you are happy with the proposed results, you can refactor the method. The target class will now contain the method you just moved, as shown in the following screenshot:

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
PhpStorm Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon