PHP Code Beautifier and Fixer for Visual Studio CodeThis extension provides the PHP Code Beautifier and Fixer (
This is a fork of https://marketplace.visualstudio.com/items?itemName=persoderlind.vscode-phpcbf Given that the extension is no longer maintained, I created a fork of it and added support for "Format Selection" Preview
Requirementsphpcbf must be installed. phpcbf is installed when you install phpcs.
A quick install is using composer. After installing composer, in your workspace root, run the following command:
Extension SettingsThis extension has the following settings:
The default settings are
In a multi-root project, settings can be saved in Coding standardsnullWhen set to
Available standardsBy default, the following standards are available: Additional standardsIf you add a standard to phpcs, it will be available for phpcbf. Some popular standards are: Drupal, WordPress, Yii2, Magento and Symfony. Rules fileYou can also point to a phpcs.xml rules file, eg: Known IssuesNone, but this is my first vscode extension, you're warned :) Release NotesPlease see the changelog. CreditsI learned a lot reading the code of, and borrowing code from PHP CS Fixer for Visual Studio Code. Copyright and LicensePHP Code Beautifier and Fixer for Visual Studio Code is copyright 2018 Per Soderlind PHP Code Beautifier and Fixer for Visual Studio Code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. PHP Code Beautifier and Fixer for Visual Studio Code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the Extension. If not, see http://www.gnu.org/licenses/. |