1.0.0 • Published 8 years ago

grunt-php-cs-fixer v1.0.0

Weekly downloads
150
License
-
Repository
github
Last release
8 years ago

grunt-php-cs-fixer

Grunt plugin for running PHP Coding Standards Fixer.

Installation

  1. Install grunt-php-cs-fixer
npm install grunt-php-cs-fixer --save-dev
  1. Install PHP Coding Standards Fixer

  2. Include the task in your Gruntfile with a line like this

grunt.loadNpmTasks('grunt-php-cs-fixer');

Usage Example

To be included in your Grunt initConfig.

phpcsfixer: {
	app: {
		dir: 'app' // or ['src/models', 'src/lib']
	},
	options: {
		bin: 'vendor/bin/php-cs-fixer',
		usingCache: "no",
		quiet: true
	}
}

This task is a multi task so any targets, files and options should be specified accordingly.

Target Properties

dir

Type: String || Array

The file(s) or directory(s) to fix.

Options

bin

Type: String Default: 'php-cs-fixer'

The path to php-cs-fixer.
(For composer, use vendor/bin/php-cs-fixer).

configfile

Type: String Default: null

Path to php-cs-fixer config file.

verbose

Type: Boolean Default: false

Output full info including warnings and a list of changes.

quiet

Type: Boolean Default: false

Output minimal info.

diff

Type: Boolean Default: false

Show a diff for the proposed changes.

dryRun

Type: Boolean Default: false

Don't effect the proposed changes (useful when combined with --diff).

allowRisky

Type: Boolean Default: false

Allows you to set whether risky rules may run.

usingCache

Type: Boolean Default: no

Controls whether a local cache is used, accepted values are "yes" or "no".

rules

Type: String Default: (all PSR rules)

Comma-separated string, or array of rules to use.
@see https://github.com/FriendsOfPHP/PHP-CS-Fixer.

1.0.0

8 years ago

0.0.10

8 years ago

0.0.9

9 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

11 years ago

0.0.5

11 years ago

0.0.4

12 years ago

0.0.3

12 years ago

0.0.2

12 years ago

0.0.1

12 years ago