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 84K
  • Win 54K
  • OS X 16K
  • Linux 14K
Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6
Windows 16 47 44 61 60 60 50 35 37 48 40 59 71 43 38 30 62 47 49 68 63 34 42 51 60 57 66 56 35 33 56 60 47 61 60 26 46 52 44 57 76 56 36 28 38 63
OS X 1 11 19 11 17 5 13 3 12 13 14 6 16 11 7 10 21 10 11 16 13 4 10 12 12 12 14 12 5 7 15 9 8 17 10 8 4 11 13 5 10 8 5 6 10 11
Linux 3 9 3 10 8 12 15 6 10 21 13 13 13 9 4 13 11 12 14 14 13 9 6 11 14 23 16 13 11 5 9 9 20 18 10 3 10 17 14 19 16 19 5 5 12 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.