Permalink
Browse files

fixed README

  • Loading branch information...
fabpot committed Jun 20, 2012
1 parent 31b0ad6 commit 950014495b521c3f1b7a1cfa3dfacffd5bf1d7a0
Showing with 51 additions and 9 deletions.
  1. +18 −9 README.md
  2. +33 −0 Symfony/CS/Console/Command/ReadmeCommand.php
View
@@ -61,6 +61,7 @@ problems as possible on a given file or directory:
The `--level` option limits the fixers to apply on the
project:
+ php php-cs-fixer.phar fix /path/to/project --level=psr0
php php-cs-fixer.phar fix /path/to/project --level=psr1
php php-cs-fixer.phar fix /path/to/project --level=psr2
php php-cs-fixer.phar fix /path/to/project --level=all
@@ -81,22 +82,18 @@ Choose from the list of available fixers:
* **trailing_spaces** [PSR-2] Remove trailing whitespace at the end of lines.
- * **phpdoc_params** [all] All items of the @param phpdoc tags must be
- aligned vertically.
-
* **unused_use** [all] Unused use statements must be removed.
+ * **php_closing_tag** [PSR-2] The closing ?> tag MUST be omitted from files
+ containing only PHP.
+
* **short_tag** [PSR-1] PHP code must use the long <?php ?> tags or the
short-echo <?= ?> tags; it must not use the other tag
variations.
* **return** [all] An empty line feed should precede a return
statement.
- * **extra_empty_lines** [all] Removes extra empty lines.
-
- * **eof_ending** [all] A file must always ends with an empty line feed.
-
* **visibility** [PSR-2] Visibility must be declared on all properties
and methods; abstract and final must be declared before
the visibility; static must be declared after the
@@ -108,8 +105,20 @@ Choose from the list of available fixers:
structures must go on the same line, and closing braces
must go on the next line after the body.
- * **php_closing_tag** [PSR-2] The closing ?> tag MUST be omitted from files
- containing only PHP.
+ * **phpdoc_params** [all] All items of the @param phpdoc tags must be
+ aligned vertically.
+
+ * **eof_ending** [all] A file must always ends with an empty line feed.
+
+ * **extra_empty_lines** [all] Removes extra empty lines.
+
+ * **include** [all] Include and file path should be devided with
+ single space. File path should not be placed under
+ brackets.
+
+ * **psr0** [PSR-0] Classes must be in a path that matches their
+ namespace, be at least one namespace deep, and the
+ class name should match the file name.
* **controls_spaces** [all] A single space should be between: the closing
brace and the control, the control and the opening
@@ -51,10 +51,43 @@ protected function execute(InputInterface $input, OutputInterface $output)
Installation
------------
+### Locally
+
Download the
[`php-cs-fixer.phar`](http://cs.sensiolabs.org/get/php-cs-fixer.phar) file and
store it somewhere on your computer.
+### Globally
+
+You can run these commands to easily acces `php-cs-fixer` from anywhere on your system:
+
+ \$ sudo wget http://cs.sensiolabs.org/get/php-cs-fixer.phar -O /usr/local/bin/php-cs-fixer
+
+or with curl:
+
+ \$ sudo curl http://cs.sensiolabs.org/get/php-cs-fixer.phar -o /usr/local/bin/php-cs-fixer
+
+then:
+
+ \$ sudo chmod a+x /usr/local/bin/php-cs-fixer
+
+Then, just run `php-cs-fixer` in order to run php-cs-fixer
+
+Update
+------
+
+### Locally
+
+The `self-update` command tries to update php-cs-fixer itself:
+
+ \$ php php-cs-fixer.phar self-update
+
+### Globally
+
+You can update php-cs-fixer through this command:
+
+ \$ sudo php-cs-fixer self-update
+
Usage
-----

0 comments on commit 9500144

Please sign in to comment.