ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

PHP Codebeautifier

by Ennosuke ST2/ST3

This is a plugin for Sublime Text 3 that gives the option to run the phpcbf

Details

Installs

  • Total 100K
  • Win 66K
  • OS X 18K
  • Linux 16K
Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4 Sep 3 Sep 2 Sep 1 Aug 31 Aug 30 Aug 29 Aug 28 Aug 27 Aug 26 Aug 25 Aug 24 Aug 23 Aug 22 Aug 21 Aug 20 Aug 19 Aug 18 Aug 17 Aug 16 Aug 15 Aug 14 Aug 13 Aug 12 Aug 11 Aug 10 Aug 9 Aug 8 Aug 7 Aug 6 Aug 5 Aug 4 Aug 3 Aug 2 Aug 1
Windows 25 25 35 45 55 47 31 21 36 32 43 49 44 33 29 31 31 50 40 41 46 23 23 45 48 55 48 45 19 34 40 42 37 44 42 23 25 41 51 48 60 47 30 30 45 48
OS X 2 3 8 8 10 10 11 1 6 11 8 8 6 6 2 3 6 8 4 8 6 4 3 5 10 10 10 8 6 1 1 6 10 6 15 4 4 7 2 10 9 6 6 5 7 5
Linux 4 6 16 8 10 16 18 4 5 13 18 8 5 9 4 6 6 6 9 10 5 5 3 9 10 7 5 7 7 5 10 2 6 10 10 5 7 12 7 10 6 16 3 7 16 8

Readme

Source
raw.​githubusercontent.​com

PHP-Codebeautifier

This is a plugin for Sublime Text 3 that gives the option to run the phpcbf

Prerequisite

You need the PHP Codesniffer more precise the code beautifier from them.

Install

Clone this repo into your Packages folder of Sublime Text. If phpcbf is in your path you don't need to do much setup. Otherwise create a user config for this plugin and set the path to your executable.

{
  "path": "/path/to/your/phpcbf"
}

Please note that the executable has to be in the string.

Usage

The usage is pretty straight forward just press CTRL+ALT+F or use the button in the Tools menu to execute it. For longer files give it a bit to run.

Configuration

Nearly all configuration options from phpcbf are bound to options in the settings file. Please refer to the documentiation for phpcbf to know what they do.

The three most important ones are

  1. path - Sets the path to the phpcbf executable
  2. level - Sets the code standard to follow. Default: psr-2
  3. patch - Sets whenether patch command should be used.