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 98K
  • Win 64K
  • OS X 18K
  • Linux 16K
Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12 Jun 11 Jun 10 Jun 9 Jun 8 Jun 7 Jun 6 Jun 5 Jun 4 Jun 3
Windows 41 46 54 45 21 30 32 45 62 62 45 23 23 42 42 45 18 46 22 31 34 39 47 46 39 15 17 37 41 34 50 40 25 34 41 51 37 31 31 14 22 40 39 47 35 34
OS X 8 14 6 3 3 6 9 6 7 6 6 7 4 6 7 12 6 9 1 4 5 9 7 6 6 1 0 3 10 5 5 15 8 3 7 5 3 12 6 2 4 10 7 5 7 9
Linux 5 9 5 7 1 11 9 8 10 9 8 12 5 11 12 9 5 8 3 3 7 8 9 12 5 10 6 8 11 17 9 13 2 6 7 11 11 9 13 2 0 5 9 5 19 9

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.