# grunt-php-cs-fixer-branch

> Grunt plugin for running PHP Coding Standards Fixer in the modified files of the current branch

Latest version **1.0.1** (published 2022-01-12) · ISC license · 0 weekly downloads

## Install

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

## 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.1 |
| Published | 2022-01-12 |
| First published | 2015-06-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 11 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Ionatan Wiznia |
| Maintainers | iwiznia |
| Keywords | gruntplugin, php, phpcs, codingstandards |

## Links

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

## Dependencies (2)

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

## Recent versions

- 1.0.1 (latest) — 2022-01-12
- 1.0.0 — 2015-10-05
- 0.0.6 — 2015-06-04

## README

# grunt-php-cs-fixer-branch

> Grunt plugin for running [PHP Coding Standards Fixer](https://github.com/fabpot/PHP-CS-Fixer) just in 
the modified files of the current git branch

> Heavily inspired/copied from https://github.com/mgmcintyre/grunt-php-cs-fixer

## Installation

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

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

3. Include the task in your Gruntfile with a line like this
```
grunt.loadNpmTasks('grunt-php-cs-fixer-branch');
```

## Usage Example

_To be included in your Grunt `initConfig`._

```js
phpcsfixer: {
	app: {},
	options: {
		bin: 'vendor/bin/php-cs-fixer',
		ignoreExitCode: true,
		level: 'all',
		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

###Options

#### bin
Type: `String`  Default: `'php-cs-fixer'`

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

#### ignoreExitCode
Type: `Boolean` Default: `false`

_Don't fail even if we get a non-zero return._

#### verbose
Type: `Boolean` Default: `false`

_Output full info including warnings and a list of changes._

#### 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 `--verbose` and `--diff`)._

#### level
Type: `String` Default: `all`

_Chooses preset list of fixers, options are `psr0`, `psr1`, `psr2`, `all`._

#### fixers
Type: `String|Array` Default: `null`

#### framework
Type: `String` Default: `default`

_Chooses option customizes the files to analyse, based on some well-known frameworks directory structures, options are `magento`, `sf20`, `sf21`._

_Comma-separated string, or array of fixers to use._  
_@see [https://github.com/fabpot/PHP-CS-Fixer](https://github.com/fabpot/PHP-CS-Fixer)._

#### branch
Type: `String` Default: `master`

_The git branch to compare against_


#### ignored
Type: `String` Default: `null`

_Pattern to ignore files_

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