Gruntfile.js   A
last analyzed

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 62
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 32
c 0
b 0
f 0
dl 0
loc 62
rs 10
mnd 0
bc 0
fnc 1
bpm 0
cpm 1
noi 0
1
module.exports = function( grunt ) {
2
	require( 'load-grunt-tasks' )( grunt );
3
4
	// Project configuration.
5
	grunt.initConfig( {
6
		// Package
7
		pkg: grunt.file.readJSON( 'package.json' ),
8
9
		// JSHint
10
		jshint: {
11
			all: [ 'Gruntfile.js', 'composer.json', 'package.json' ]
12
		},
13
14
		// PHP Code Sniffer
15
		phpcs: {
16
			application: {
17
				src: [
18
					'**/*.php',
19
					'!node_modules/**',
20
					'!vendor/**',
21
					'!wordpress/**',
22
					'!wp-content/**'
23
				],
24
			},
25
			options: {
26
				bin: 'vendor/bin/phpcs',
27
				standard: 'phpcs.xml.dist',
28
				showSniffCodes: true
29
			}
30
		},
31
32
		// PHPLint
33
		phplint: {
34
			all: [ 'src/**/*.php' ]
35
		},
36
37
		// PHP Mess Detector
38
		phpmd: {
39
			application: {
40
				dir: 'src'
41
			},
42
			options: {
43
				exclude: 'node_modules',
44
				reportFormat: 'xml',
45
				rulesets: 'phpmd.ruleset.xml'
46
			}
47
		},
48
		
49
		// PHPUnit
50
		phpunit: {
51
			options: {
52
				bin: 'vendor/bin/phpunit'
53
			},
54
			classes: {
55
				
56
			}
57
		}
58
	} );
59
60
	// Default task(s).
61
	grunt.registerTask( 'default', [ 'jshint', 'phplint', 'phpmd', 'phpcs', 'phpunit' ] );
62
};
63