In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article focuses on "what are the PHP code refactoring tools", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn what PHP code refactoring tools are available.
1. Rephactor
Rephactor is a command-line refactoring tool, an automated tool that allows developers to modify source code in different code bases in a concise way.
Main functions:
Ensure the reversibility of refactoring-once a problem is found, the code is reversible and can be traced back to the previous version.
Find replace function-general find replace, method rename, class rename, regular expression pattern replacement.
After all the operations are completed, the test is carried out based on SimpleTest Aperiplus, and the test coverage is guaranteed.
Integrate Phemto to ensure the correlation testing of classes.
2. Scisr
Scisr is a refactoring tool written in PHP. The project is hosted on GitHub. Issued under the GPL license.
How to use it:
Rename the class:
The copy code is as follows:
$scisr rename-class OldName NewName [files]
Modify method:
The copy code is as follows:
$scisr rename-method OwningClassName oldMethodName newMethodName [files]
File renaming:
The copy code is as follows:
$scisr rename-file old/file_name new/dir/new_file_name [files]
Rename classes and files:
The copy code is as follows:
$scisr rename-class-file OldClassName NewClassName [files]
3. PHP Refactoring Browser
This is a PHP code refactoring tool, through the generation of diffs to describe the steps of refactoring, to avoid simple errors in the refactoring process, this tool is very good. The project is hosted on GitHub.
Use the library:
PHP Parser by Nikic
PHP Token Reflection from Ond "ej Ne" p
Refactoring browser data mainly includes the following aspects:
Patches-support to create patches based on change file operations
Refactoring-including actual reconstructed domains and adapting third-party libraries
Collection-reliably adds set semantics based on the PHP array. Currently contains a set of types.
4. PhpStorm
PhpStorm is a rich PHP IDE application developed by JetBrains and supports refactoring. PhpStorm can help users adjust their code, run unit tests or provide visual debugging functions at any time.
Currently, PhpStorm 7 has been released, which supports PHP5.5; to improve PHP syntax coloring performance; Vagrant, SSH control & remote tools; support for Drupal & PHP framework; and improved debugging and testing performance.
The main features of PhpStorm are:
Intelligent PHP coding editor
Code quality analysis
Support for debugging / testing
Support for HTML/CSS/JavaScript editor
Support for cross-platform.
5. Zend Studio
Zend Studio is a PHP language integrated development environment developed by Zend Technologies. HTML and JS tags are supported, but debugging support is only provided for the PHP language.
Main features:
Have powerful professional editing tools and debugging tools
Support PHP syntax highlighting, syntax auto-filling function, syntax automatic indentation and code copy function
Bookmark function is supported
Built-in a powerful PHP code debugging tool
Supports both local and remote debugging modes and supports a variety of advanced debugging functions.
At this point, I believe you have a deeper understanding of "what PHP code refactoring tools are available". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.