New Video Series: Refactoring With PhpStorm by Matthew Setter
We’ve collaborated with PHP engineer and technical trainer Matthew Setter to bring you a 7-part video series showing how to systematically improve the quality of your code using PhpStorm’s refactoring functionality.
Check out the first two episodes!
What you are going to learn
In this series Matthew’s going to teach you how to perform the following refactorings:
- Change Signature: You’ll learn how to change method names and return types; add, remove, and reorder parameters, and assign default values to parameters; change parameter names and types; and propagate new parameters through the method call hierarchy.
- Extract Class: You’ll discover how to make classes more cohesive and, if they get too large, how to extract methods and fields into a new class.
- Extract Constant: We’ll explore how to make your source code easier to read and maintain by refactoring hard-coded constants that provide no explanation of their value or purpose into class constants.
- Extract Interface: You’ll learn how to extract methods to an interface and mark the source class as implementing the new interface.
- Extract Method: We’ll discuss how to refactor code into a new method so that it can be used over and over again.
- Inline Variable: You’ll learn how to replace the usage of a redundant variable with the variable’s underlying expression.
- Introduce Field: You’ll discover how to refactor an expression into a new class-level field so that it can be readily used throughout the class.
- Introduce Variable: You’ll learn how to refactor a selected expression into a new variable, which greatly helps reduce code duplication.
- Rename: You’ll learn how to rename symbols, such as variables, constants, classes, and methods, as well as files and directories, so that they are more intuitive, meaningful, and representative of their purpose.
- Pull Members Up: You’ll learn how to move class members up to parent classes. This helps you avoid manually copying methods and fields from one class into another, along with updating references to them.
By the end of this series, you’ll be proficient at using PhpStorm to clean up code.
About Matthew Setter
Matthew Setter is an Australian web developer with over 15 years of professional software development experience. He has been working with PHP ever since version 3. He specializes in PHP’s Mezzio framework and wrote the foundational book: Mezzio Essentials.
Twitter | Blog
Subscribe to Blog updates
Thanks, we've got you!
PhpStorm Overview 2022
Do you want to get to know PhpStorm? Maybe you have a colleague or friend who wants to know why you love this IDE? We’ve made a five-minute video about PhpStorm for you. We’ll highlight some of its core features: a to-the-point summary of why PhpStorm is a great choice for all PHP developers out the…
New Video: What’s New in PHP 8.1
PHP 8.1 is out, and it’s packed with lots of awesome new features. But don’t just take our word for it – watch the video, where Brent Roose, the PHP community members, and the authors of these features, Nikita Popov, Larry Garfield, Dmitry Stogov, Matthieu Napoli, and Aaron Piotrowski, explain them.…
Video: What’s Coming in PhpStorm 2021.1 – Episode 2
The main focus for this upcoming release is stability, but it still includes some new features and improvements. In this video, we’ll look at support for prefixed table names in SQL in action, synthetic scope renaming, new inspections, and other updates. A new PhpStorm EAP cycle is going to be clos…
What’s Coming in PhpStorm 2021.1 – Episode 1
A new PhpStorm EAP cycle is now in full swing. The main focus for this upcoming release is stability, but it still includes some new features and improvements. In this video, you can see new inspections in action, as well as a number of UI updates. Subscribe to the JetbrainsTV YouTube channel and t…