Gruntfile.js   A
last analyzed

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 63
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 33
c 0
b 0
f 0
dl 0
loc 63
rs 10
wmc 1
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
				bin: 'vendor/bin/phpmd',
44
				exclude: 'node_modules',
45
				reportFormat: 'xml',
46
				rulesets: 'phpmd.ruleset.xml'
47
			}
48
		},
49
		
50
		// PHPUnit
51
		phpunit: {
52
			options: {
53
				bin: 'vendor/bin/phpunit'
54
			},
55
			classes: {
56
				
57
			}
58
		}
59
	} );
60
61
	// Default task(s).
62
	grunt.registerTask( 'default', [ 'jshint', 'phplint', 'phpmd', 'phpcs', 'phpunit' ] );
63
};
64