# grunt-php-cs-fixer

> Grunt plugin for running PHP Coding Standards Fixer

Latest version **1.0.0** (published 2017-01-22) · 0 weekly downloads

## Install

```sh
npm install grunt-php-cs-fixer
pnpm add grunt-php-cs-fixer
yarn add grunt-php-cs-fixer
bun add grunt-php-cs-fixer
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-01-22 |
| First published | 2013-10-21 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >0.10 |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Mark McIntyre |
| Maintainers | mgmio |
| Keywords | gruntplugin, php, phpcs, codingstandards |

## Links

- npm: https://www.npmjs.com/package/grunt-php-cs-fixer
- Repository: https://github.com/mgmcintyre/grunt-php-cs-fixer
- Issues: https://github.com/mgmcintyre/grunt-php-cs-fixer/issues
- npm.io page: https://npm.io/package/grunt-php-cs-fixer

## Dependencies (2)

- [async](https://npm.io/package/async.md) ^0.9.0
- [underscore](https://npm.io/package/underscore.md) ~1.5.2

## Recent versions

- 1.0.0 (latest) — 2017-01-22
- 0.0.10 — 2017-01-22
- 0.0.9 — 2016-08-28
- 0.0.8 — 2015-01-17
- 0.0.7 — 2015-01-14
- 0.0.6 — 2014-08-25
- 0.0.5 — 2014-04-14
- 0.0.4 — 2013-11-08
- 0.0.3 — 2013-10-21
- 0.0.2 — 2013-10-21
- 0.0.1 — 2013-10-21

## README

# grunt-php-cs-fixer

> Grunt plugin for running [PHP Coding Standards Fixer](https://github.com/fabpot/PHP-CS-Fixer).

## Installation

1. Install grunt-php-cs-fixer
```
npm install grunt-php-cs-fixer --save-dev
```

2. [Install PHP Coding Standards Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer)

3. 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`._

```js
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.__

[multi task]: http://gruntjs.com/creating-tasks#multi-tasks

## 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](https://github.com/FriendsOfPHP/PHP-CS-Fixer)._

---
_Source: https://npm.io/package/grunt-php-cs-fixer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
