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 95K
  • Win 62K
  • OS X 17K
  • Linux 16K
May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5
Windows 6 31 35 40 41 69 50 42 27 33 44 40 39 34 35 27 37 36 38 44 41 41 21 38 48 70 31 42 35 31 33 47 41 56 35 40 24 30 55 64 43 40 49 31 28 40
OS X 2 4 5 3 13 12 8 10 7 8 6 5 10 5 9 7 8 5 11 6 10 4 8 4 7 8 10 6 10 2 3 8 9 11 8 11 4 1 7 18 10 13 10 5 4 8
Linux 1 6 4 10 18 10 7 7 8 9 12 11 10 7 13 5 6 15 5 6 6 4 6 11 8 15 14 7 12 3 7 19 11 4 20 11 6 4 15 18 11 16 11 4 10 16

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.