README.rst 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827
  1. PHP Coding Standards Fixer
  2. ==========================
  3. The PHP Coding Standards Fixer tool fixes *most* issues in your code when you
  4. want to follow the PHP coding standards as defined in the PSR-1 and PSR-2
  5. documents.
  6. If you are already using ``PHP_CodeSniffer`` to identify coding standards
  7. problems in your code, you know that fixing them by hand is tedious, especially
  8. on large projects. This tool does the job for you.
  9. Requirements
  10. ------------
  11. PHP needs to be a minimum version of PHP 5.3.6.
  12. Installation
  13. ------------
  14. Locally
  15. ~~~~~~~
  16. Download the `php-cs-fixer.phar`_ file and store it somewhere on your computer.
  17. Globally (manual)
  18. ~~~~~~~~~~~~~~~~~
  19. You can run these commands to easily access ``php-cs-fixer`` from anywhere on
  20. your system:
  21. .. code-block:: bash
  22. $ wget http://get.sensiolabs.org/php-cs-fixer.phar -O php-cs-fixer
  23. or with curl:
  24. .. code-block:: bash
  25. $ curl http://get.sensiolabs.org/php-cs-fixer.phar -o php-cs-fixer
  26. then:
  27. .. code-block:: bash
  28. $ sudo chmod a+x php-cs-fixer
  29. $ sudo mv php-cs-fixer /usr/local/bin/php-cs-fixer
  30. Then, just run ``php-cs-fixer``.
  31. Globally (Composer)
  32. ~~~~~~~~~~~~~~~~~~~
  33. To install PHP-CS-Fixer, install Composer and issue the following command:
  34. .. code-block:: bash
  35. $ ./composer.phar global require fabpot/php-cs-fixer
  36. Then, make sure you have ``~/.composer/vendor/bin`` in your ``PATH``, and
  37. you're good to go:
  38. .. code-block:: bash
  39. export PATH="$PATH:$HOME/.composer/vendor/bin"
  40. Globally (homebrew)
  41. ~~~~~~~~~~~~~~~~~~~
  42. PHP-CS-Fixer is part of the homebrew-php project. Follow the installation
  43. instructions at https://github.com/homebrew/homebrew-php if you don't
  44. already have it.
  45. .. code-block:: bash
  46. $ brew install homebrew/php/php-cs-fixer
  47. Update
  48. ------
  49. Locally
  50. ~~~~~~~
  51. The ``self-update`` command tries to update ``php-cs-fixer`` itself:
  52. .. code-block:: bash
  53. $ php php-cs-fixer.phar self-update
  54. Globally (manual)
  55. ~~~~~~~~~~~~~~~~~
  56. You can update ``php-cs-fixer`` through this command:
  57. .. code-block:: bash
  58. $ sudo php-cs-fixer self-update
  59. Globally (Composer)
  60. ~~~~~~~~~~~~~~~~~~~
  61. You can update ``php-cs-fixer`` through this command:
  62. .. code-block:: bash
  63. $ ./composer.phar global update fabpot/php-cs-fixer
  64. Globally (homebrew)
  65. ~~~~~~~~~~~~~~~~~~~
  66. You can update ``php-cs-fixer`` through this command:
  67. .. code-block:: bash
  68. $ brew upgrade php-cs-fixer
  69. Usage
  70. -----
  71. The ``fix`` command tries to fix as much coding standards
  72. problems as possible on a given file or directory:
  73. .. code-block:: bash
  74. php php-cs-fixer.phar fix /path/to/dir
  75. php php-cs-fixer.phar fix /path/to/file
  76. The ``--verbose`` option show applied fixers. When using ``txt`` format it will also displays progress notification.
  77. The ``--format`` option for the output format. Support are ``txt`` (default one), ``json`` and ``xml``.
  78. The ``--level`` option limits the fixers to apply on the
  79. project:
  80. .. code-block:: bash
  81. php php-cs-fixer.phar fix /path/to/project --level=psr0
  82. php php-cs-fixer.phar fix /path/to/project --level=psr1
  83. php php-cs-fixer.phar fix /path/to/project --level=psr2
  84. php php-cs-fixer.phar fix /path/to/project --level=symfony
  85. By default, all PSR-2 fixers and some additional ones are run. The "contrib
  86. level" fixers cannot be enabled via this option; you should instead set them
  87. manually by their name via the ``--fixers`` option.
  88. The ``--fixers`` option lets you choose the exact fixers to
  89. apply (the fixer names must be separated by a comma):
  90. .. code-block:: bash
  91. php php-cs-fixer.phar fix /path/to/dir --fixers=linefeed,short_tag,indentation
  92. You can also blacklist the fixers you don't want by placing a dash in front of the fixer name, if this is more convenient,
  93. using ``-name_of_fixer``:
  94. .. code-block:: bash
  95. php php-cs-fixer.phar fix /path/to/dir --fixers=-short_tag,-indentation
  96. When using combination with exact and blacklist fixers, apply exact fixers along with above blacklisted result:
  97. .. code-block:: bash
  98. php php-cs-fixer.phar fix /path/to/dir --fixers=linefeed,-short_tag
  99. A combination of ``--dry-run`` and ``--diff`` will
  100. display summary of proposed fixes, leaving your files unchanged.
  101. The command can also read from standard input, in which case it won't
  102. automatically fix anything:
  103. .. code-block:: bash
  104. cat foo.php | php php-cs-fixer.phar fix --diff -
  105. Choose from the list of available fixers:
  106. * **psr0** [PSR-0]
  107. Classes must be in a path that
  108. matches their namespace, be at
  109. least one namespace deep, and
  110. the class name should match
  111. the file name.
  112. * **encoding** [PSR-1]
  113. PHP code MUST use only UTF-8
  114. without BOM (remove BOM).
  115. * **short_tag** [PSR-1]
  116. PHP code must use the long
  117. <?php ?> tags or the
  118. short-echo <?= ?> tags; it
  119. must not use the other tag
  120. variations.
  121. * **braces** [PSR-2]
  122. The body of each structure
  123. MUST be enclosed by braces.
  124. Braces should be properly
  125. placed. Body of braces should
  126. be properly indented.
  127. * **class_definition** [PSR-2]
  128. Whitespace around the key
  129. words of a class, trait or
  130. interfaces definition should
  131. be one space.
  132. * **elseif** [PSR-2]
  133. The keyword elseif should be
  134. used instead of else if so
  135. that all control keywords
  136. looks like single words.
  137. * **eof_ending** [PSR-2]
  138. A file must always end with a
  139. single empty line feed.
  140. * **function_call_space** [PSR-2]
  141. When making a method or
  142. function call, there MUST NOT
  143. be a space between the method
  144. or function name and the
  145. opening parenthesis.
  146. * **function_declaration** [PSR-2]
  147. Spaces should be properly
  148. placed in a function
  149. declaration.
  150. * **indentation** [PSR-2]
  151. Code MUST use an indent of 4
  152. spaces, and MUST NOT use tabs
  153. for indenting.
  154. * **line_after_namespace** [PSR-2]
  155. There MUST be one blank line
  156. after the namespace
  157. declaration.
  158. * **linefeed** [PSR-2]
  159. All PHP files must use the
  160. Unix LF (linefeed) line
  161. ending.
  162. * **lowercase_constants** [PSR-2]
  163. The PHP constants true, false,
  164. and null MUST be in lower
  165. case.
  166. * **lowercase_keywords** [PSR-2]
  167. PHP keywords MUST be in lower
  168. case.
  169. * **method_argument_space** [PSR-2]
  170. In method arguments and method
  171. call, there MUST NOT be a
  172. space before each comma and
  173. there MUST be one space after
  174. each comma.
  175. * **multiple_use** [PSR-2]
  176. There MUST be one use keyword
  177. per declaration.
  178. * **parenthesis** [PSR-2]
  179. There MUST NOT be a space
  180. after the opening parenthesis.
  181. There MUST NOT be a space
  182. before the closing
  183. parenthesis.
  184. * **php_closing_tag** [PSR-2]
  185. The closing ?> tag MUST be
  186. omitted from files containing
  187. only PHP.
  188. * **single_line_after_imports** [PSR-2]
  189. Each namespace use MUST go on
  190. its own line and there MUST be
  191. one blank line after the use
  192. statements block.
  193. * **trailing_spaces** [PSR-2]
  194. Remove trailing whitespace at
  195. the end of non-blank lines.
  196. * **visibility** [PSR-2]
  197. Visibility MUST be declared on
  198. all properties and methods;
  199. abstract and final MUST be
  200. declared before the
  201. visibility; static MUST be
  202. declared after the visibility.
  203. * **array_element_no_space_before_comma** [symfony]
  204. In array declaration, there
  205. MUST NOT be a whitespace
  206. before each comma.
  207. * **array_element_white_space_after_comma** [symfony]
  208. In array declaration, there
  209. MUST be a whitespace after
  210. each comma.
  211. * **blankline_after_open_tag** [symfony]
  212. Ensure there is no code on the
  213. same line as the PHP open tag
  214. and it is followed by a
  215. blankline.
  216. * **concat_without_spaces** [symfony]
  217. Concatenation should be used
  218. without spaces.
  219. * **double_arrow_multiline_whitespaces** [symfony]
  220. Operator => should not be
  221. surrounded by multi-line
  222. whitespaces.
  223. * **duplicate_semicolon** [symfony]
  224. Remove duplicated semicolons.
  225. * **empty_return** [symfony]
  226. A return statement wishing to
  227. return nothing should be
  228. simply "return".
  229. * **extra_empty_lines** [symfony]
  230. Removes extra empty lines.
  231. * **function_typehint_space** [symfony]
  232. Add missing space between
  233. function's argument and its
  234. typehint.
  235. * **include** [symfony]
  236. Include and file path should
  237. be divided with a single
  238. space. File path should not be
  239. placed under brackets.
  240. * **join_function** [symfony]
  241. Implode function should be
  242. used instead of join function.
  243. * **list_commas** [symfony]
  244. Remove trailing commas in list
  245. function calls.
  246. * **method_argument_default_value** [symfony]
  247. In method arguments there must
  248. not be arguments with default
  249. values before non-default
  250. ones.
  251. * **multiline_array_trailing_comma** [symfony]
  252. PHP multi-line arrays should
  253. have a trailing comma.
  254. * **namespace_no_leading_whitespace** [symfony]
  255. The namespace declaration line
  256. shouldn't contain leading
  257. whitespace.
  258. * **new_with_braces** [symfony]
  259. All instances created with new
  260. keyword must be followed by
  261. braces.
  262. * **no_blank_lines_after_class_opening** [symfony]
  263. There should be no empty lines
  264. after class opening brace.
  265. * **no_empty_lines_after_phpdocs** [symfony]
  266. There should not be blank
  267. lines between docblock and the
  268. documented element.
  269. * **object_operator** [symfony]
  270. There should not be space
  271. before or after object
  272. T_OBJECT_OPERATOR.
  273. * **operators_spaces** [symfony]
  274. Binary operators should be
  275. surrounded by at least one
  276. space.
  277. * **phpdoc_indent** [symfony]
  278. Docblocks should have the same
  279. indentation as the documented
  280. subject.
  281. * **phpdoc_inline_tag** [symfony]
  282. Fix PHPDoc inline tags, make
  283. inheritdoc always inline.
  284. * **phpdoc_no_access** [symfony]
  285. @access annotations should be
  286. omitted from phpdocs.
  287. * **phpdoc_no_empty_return** [symfony]
  288. @return void and @return null
  289. annotations should be omitted
  290. from phpdocs.
  291. * **phpdoc_no_package** [symfony]
  292. @package and @subpackage
  293. annotations should be omitted
  294. from phpdocs.
  295. * **phpdoc_params** [symfony]
  296. All items of the @param,
  297. @throws, @return, @var, and
  298. @type phpdoc tags must be
  299. aligned vertically.
  300. * **phpdoc_scalar** [symfony]
  301. Scalar types should always be
  302. written in the same form.
  303. "int", not "integer"; "bool",
  304. not "boolean"; "float", not
  305. "real" or "double".
  306. * **phpdoc_separation** [symfony]
  307. Annotations in phpdocs should
  308. be grouped together so that
  309. annotations of the same type
  310. immediately follow each other,
  311. and annotations of a different
  312. type are separated by a single
  313. blank line.
  314. * **phpdoc_short_description** [symfony]
  315. Phpdocs short descriptions
  316. should end in either a full
  317. stop, exclamation mark, or
  318. question mark.
  319. * **phpdoc_to_comment** [symfony]
  320. Docblocks should only be used
  321. on structural elements.
  322. * **phpdoc_trim** [symfony]
  323. Phpdocs should start and end
  324. with content, excluding the
  325. very first and last line of
  326. the docblocks.
  327. * **phpdoc_type_to_var** [symfony]
  328. @type should always be written
  329. as @var.
  330. * **phpdoc_types** [symfony]
  331. The correct case must be used
  332. for standard PHP types in
  333. phpdoc.
  334. * **phpdoc_var_without_name** [symfony]
  335. @var and @type annotations
  336. should not contain the
  337. variable name.
  338. * **pre_increment** [symfony]
  339. Pre
  340. incrementation/decrementation
  341. should be used if possible.
  342. * **print_to_echo** [symfony]
  343. Converts print language
  344. construct to echo if possible.
  345. * **remove_leading_slash_use** [symfony]
  346. Remove leading slashes in use
  347. clauses.
  348. * **remove_lines_between_uses** [symfony]
  349. Removes line breaks between
  350. use statements.
  351. * **return** [symfony]
  352. An empty line feed should
  353. precede a return statement.
  354. * **self_accessor** [symfony]
  355. Inside a classy element "self"
  356. should be preferred to the
  357. class name itself.
  358. * **short_bool_cast** [symfony]
  359. Short cast bool using double
  360. exclamation mark should not be
  361. used.
  362. * **single_array_no_trailing_comma** [symfony]
  363. PHP single-line arrays should
  364. not have trailing comma.
  365. * **single_blank_line_before_namespace** [symfony]
  366. There should be exactly one
  367. blank line before a namespace
  368. declaration.
  369. * **single_quote** [symfony]
  370. Convert double quotes to
  371. single quotes for simple
  372. strings.
  373. * **spaces_after_semicolon** [symfony]
  374. Fix whitespace after a
  375. semicolon.
  376. * **spaces_before_semicolon** [symfony]
  377. Single-line whitespace before
  378. closing semicolon are
  379. prohibited.
  380. * **spaces_cast** [symfony]
  381. A single space should be
  382. between cast and variable.
  383. * **standardize_not_equal** [symfony]
  384. Replace all <> with !=.
  385. * **ternary_spaces** [symfony]
  386. Standardize spaces around
  387. ternary operator.
  388. * **trim_array_spaces** [symfony]
  389. Arrays should be formatted
  390. like function/method
  391. arguments, without leading or
  392. trailing single line space.
  393. * **unalign_double_arrow** [symfony]
  394. Unalign double arrow symbols.
  395. * **unalign_equals** [symfony]
  396. Unalign equals symbols.
  397. * **unary_operators_spaces** [symfony]
  398. Unary operators should be
  399. placed adjacent to their
  400. operands.
  401. * **unneeded_control_parentheses** [symfony]
  402. Removes unneeded parentheses
  403. around control statements.
  404. * **unused_use** [symfony]
  405. Unused use statements must be
  406. removed.
  407. * **whitespacy_lines** [symfony]
  408. Remove trailing whitespace at
  409. the end of blank lines.
  410. * **align_double_arrow** [contrib]
  411. Align double arrow symbols in
  412. consecutive lines.
  413. * **align_equals** [contrib]
  414. Align equals symbols in
  415. consecutive lines.
  416. * **concat_with_spaces** [contrib]
  417. Concatenation should be used
  418. with at least one whitespace
  419. around.
  420. * **echo_to_print** [contrib]
  421. Converts echo language
  422. construct to print if
  423. possible.
  424. * **ereg_to_preg** [contrib]
  425. Replace deprecated ereg
  426. regular expression functions
  427. with preg. Warning! This could
  428. change code behavior.
  429. * **header_comment** [contrib]
  430. Add, replace or remove header
  431. comment.
  432. * **logical_not_operators_with_spaces** [contrib]
  433. Logical NOT operators (!)
  434. should have leading and
  435. trailing whitespaces.
  436. * **logical_not_operators_with_successor_space** [contrib]
  437. Logical NOT operators (!)
  438. should have one trailing
  439. whitespace.
  440. * **long_array_syntax** [contrib]
  441. Arrays should use the long
  442. syntax.
  443. * **multiline_spaces_before_semicolon** [contrib]
  444. Multi-line whitespace before
  445. closing semicolon are
  446. prohibited.
  447. * **newline_after_open_tag** [contrib]
  448. Ensure there is no code on the
  449. same line as the PHP open tag.
  450. * **no_blank_lines_before_namespace** [contrib]
  451. There should be no blank lines
  452. before a namespace
  453. declaration.
  454. * **ordered_use** [contrib]
  455. Ordering use statements.
  456. * **php4_constructor** [contrib]
  457. Convert PHP4-style
  458. constructors to __construct.
  459. Warning! This could change
  460. code behavior.
  461. * **php_unit_construct** [contrib]
  462. PHPUnit assertion method calls
  463. like "->assertSame(true,
  464. $foo)" should be written with
  465. dedicated method like
  466. "->assertTrue($foo)". Warning!
  467. This could change code
  468. behavior.
  469. * **php_unit_strict** [contrib]
  470. PHPUnit methods like
  471. "assertSame" should be used
  472. instead of "assertEquals".
  473. Warning! This could change
  474. code behavior.
  475. * **phpdoc_order** [contrib]
  476. Annotations in phpdocs should
  477. be ordered so that param
  478. annotations come first, then
  479. throws annotations, then
  480. return annotations.
  481. * **phpdoc_var_to_type** [contrib]
  482. @var should always be written
  483. as @type.
  484. * **short_array_syntax** [contrib]
  485. PHP arrays should use the PHP
  486. 5.4 short-syntax.
  487. * **short_echo_tag** [contrib]
  488. Replace short-echo <?= with
  489. long format <?php echo syntax.
  490. * **strict** [contrib]
  491. Comparison should be strict.
  492. Warning! This could change
  493. code behavior.
  494. * **strict_param** [contrib]
  495. Functions should be used with
  496. $strict param. Warning! This
  497. could change code behavior.
  498. The ``--config`` option customizes the files to analyse, based
  499. on some well-known directory structures:
  500. .. code-block:: bash
  501. # For the Symfony 2.3+ branch
  502. php php-cs-fixer.phar fix /path/to/sf23 --config=sf23
  503. Choose from the list of available configurations:
  504. * **default** A default configuration
  505. * **magento** The configuration for a Magento application
  506. * **sf23** The configuration for the Symfony 2.3+ branch
  507. The ``--dry-run`` option displays the files that need to be
  508. fixed but without actually modifying them:
  509. .. code-block:: bash
  510. php php-cs-fixer.phar fix /path/to/code --dry-run
  511. Instead of using command line options to customize the fixer, you can save the
  512. configuration in a ``.php_cs`` file in the root directory of
  513. your project. The file must return an instance of
  514. ``Symfony\CS\ConfigInterface``, which lets you configure the fixers, the level, the files,
  515. and directories that need to be analyzed. The example below will add two contrib fixers
  516. to the default list of symfony-level fixers:
  517. .. code-block:: php
  518. <?php
  519. $finder = Symfony\CS\Finder\DefaultFinder::create()
  520. ->exclude('somedir')
  521. ->in(__DIR__)
  522. ;
  523. return Symfony\CS\Config\Config::create()
  524. ->fixers(array('strict_param', 'short_array_syntax'))
  525. ->finder($finder)
  526. ;
  527. If you want complete control over which fixers you use, you may use the empty level and
  528. then specify all fixers to be used:
  529. .. code-block:: php
  530. <?php
  531. $finder = Symfony\CS\Finder\DefaultFinder::create()
  532. ->in(__DIR__)
  533. ;
  534. return Symfony\CS\Config\Config::create()
  535. ->level(Symfony\CS\FixerInterface::NONE_LEVEL)
  536. ->fixers(array('trailing_spaces', 'encoding'))
  537. ->finder($finder)
  538. ;
  539. You may also use a blacklist for the Fixers instead of the above shown whitelist approach.
  540. The following example shows how to use all ``symfony`` Fixers but the ``psr0`` fixer.
  541. Note the additional ``-`` in front of the Fixer name.
  542. .. code-block:: php
  543. <?php
  544. $finder = Symfony\CS\Finder\DefaultFinder::create()
  545. ->exclude('somedir')
  546. ->in(__DIR__)
  547. ;
  548. return Symfony\CS\Config\Config::create()
  549. ->fixers(array('-psr0'))
  550. ->finder($finder)
  551. ;
  552. The ``symfony`` level is set by default, you can also change the default level:
  553. .. code-block:: php
  554. <?php
  555. return Symfony\CS\Config\Config::create()
  556. ->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
  557. ;
  558. In combination with these config and command line options, you can choose various usage.
  559. For example, default level is ``symfony``, but if you also don't want to use
  560. the ``psr0`` fixer, you can specify the ``--fixers="-psr0"`` option.
  561. But if you use the ``--fixers`` option with only exact fixers,
  562. only those exact fixers are enabled whether or not level is set.
  563. With the ``--config-file`` option you can specify the path to the
  564. ``.php_cs`` file.
  565. Caching
  566. -------
  567. You can enable caching by returning a custom config with caching enabled. This will
  568. speed up further runs.
  569. .. code-block:: php
  570. <?php
  571. return Symfony\CS\Config\Config::create()
  572. ->setUsingCache(true)
  573. ;
  574. Exit codes
  575. ----------
  576. * 0 OK
  577. * 1 No changes made
  578. * 16 Configuration error of the application
  579. * 32 Configuration error of a Fixer
  580. Helpers
  581. -------
  582. Dedicated plugins exist for:
  583. * `Atom`_
  584. * `NetBeans`_
  585. * `PhpStorm`_
  586. * `Sublime Text`_
  587. * `Vim`_
  588. Contribute
  589. ----------
  590. The tool comes with quite a few built-in fixers and finders, but everyone is
  591. more than welcome to `contribute`_ more of them.
  592. Fixers
  593. ~~~~~~
  594. A *fixer* is a class that tries to fix one CS issue (a ``Fixer`` class must
  595. implement ``FixerInterface``).
  596. Configs
  597. ~~~~~~~
  598. A *config* knows about the CS level and the files and directories that must be
  599. scanned by the tool when run in the directory of your project. It is useful for
  600. projects that follow a well-known directory structures (like for Symfony
  601. projects for instance).
  602. .. _php-cs-fixer.phar: http://get.sensiolabs.org/php-cs-fixer.phar
  603. .. _Atom: https://github.com/Glavin001/atom-beautify
  604. .. _NetBeans: http://plugins.netbeans.org/plugin/49042/php-cs-fixer
  605. .. _PhpStorm: http://tzfrs.de/2015/01/automatically-format-code-to-match-psr-standards-with-phpstorm
  606. .. _Sublime Text: https://github.com/benmatselby/sublime-phpcs
  607. .. _Vim: https://github.com/stephpy/vim-php-cs-fixer
  608. .. _contribute: https://github.com/FriendsOfPhp/php-cs-fixer/blob/master/CONTRIBUTING.md