# grunt-phpdcd

> Grunt plugin for running PHP Dead Code Detector.

Latest version **0.1.0** (published 2014-08-11) · BSD license · 0 weekly downloads

## Install

```sh
npm install grunt-phpdcd
pnpm add grunt-phpdcd
yarn add grunt-phpdcd
bun add grunt-phpdcd
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2014-08-11 |
| First published | 2014-08-11 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Muhammad Adeel Nawaz |
| Maintainers | madeelnawaz |
| Keywords | gruntplugin, phpdcd, dead-code-detection, ci, continous-integration |

## Links

- npm: https://www.npmjs.com/package/grunt-phpdcd
- Repository: https://github.com/adeelnawaz/grunt-phpdcd
- Issues: https://github.com/adeelnawaz/grunt-phpdcd/issues
- npm.io page: https://npm.io/package/grunt-phpdcd

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2014-08-11

## README

# grunt-phpdcd

> Grunt plugin for running [PHP Dead Code Detector](https://github.com/sebastianbergmann/phpdcd).

_This plugin is developed for Grunt `0.4.0` and is not tested for backward compatibility with Grunt `0.3.x`._

## Getting Started

1. Install this grunt plugin with the follwing command:

```shell
npm install grunt-phpdcd --save-dev
```

2. [Install PHPDCD](https://github.com/sebastianbergmann/phpdcd#installation)

3. Add this to your project's `Gruntfile.js`:

```js
grunt.loadNpmTasks('grunt-phpdcd');
```

## PHPDCD task

_Run this task with the `grunt phpdcd` command._

_This task is a [multi task][] so any targets, files and options should be specified according to the [multi task][] documentation._

[multi task]: https://github.com/gruntjs/grunt/wiki/Configuring-tasks

### Usage Example

```js
phpdcd: {
  application: {
	  dir: ['application']
	},
	options: {
	  namesExclude: 'config.php,settings.php'
	}
}
```

### Target Properties

#### dir
Type: `Array`

The files or directories where phpdcd should search for files.

### Options
#### bin
Type: `String`
Default: `'phpdcd'`

The binary name if it is in your PATH or the full path if not.

#### names
Type: `String`
Default: `false`

A comma-separated list of file names to check (default: [`"*.php"`]).

#### namesExclude
Type: `String`
Default: `false`

A comma-separated list of file names to exclude.

#### exclude
Type: `Array`
Default: `false`

A list of directories where phpdcd should not search for files.

#### recursive
Type: `Boolean`
Default: `false`

Report code as dead if it is only called by dead code.

#### quiet
Type: `Boolean`
Default: `false`

Do not output any message.

#### verbose
Type: `Number [1-3]`
Default: `false`

Increase the verbosity of messages.

- 1 for normal output
- 2 for more verbose output
- 3 for debug

#### maxBuffer
Type: `Number`
Default: `200*1024`

Override the maxBuffer-Size of nodejs's exec() function if you expect a long output on stdout.

---
Inspired by [grunt-phpmd](https://github.com/alappe/grunt-phpmd)

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