/*global module:false*/
module.exports = function(grunt) {

  // Project configuration.
  grunt.initConfig({
    // Task configuration.
    phpcs: {
      application: {
        src: ['src/**/*.php']
      },
      options: {
        bin: 'vendor/bin/phpcs',
        standard: 'phpcs.xml'
      }
    },
    phpmd: {
      application: {
        dir: 'src'
      },
      options: {
        bin: 'vendor/bin/phpmd',
        reportFormat: 'text',
        rulesets: 'codesize,controversial,design,naming,unusedcode'
      }
    },
    phpspec: {
        app: {
            specs: 'spec/'
        },
        options: {
            prefix: 'vendor/bin/'
        }
    },
    behat: {
        app: {
            cmd: 'vendor/bin/behat',
            features: 'features/'
        }
    },
    watch: {
      specs: {
        files: '<%= phpspec.app.specs %>',
        tasks: ['phpspec']
      },
      src: {
        files: '<%= phpcs.application.src %>',
        tasks: ['phpcs', 'phpspec']
      }
    }
  });

  // These plugins provide necessary tasks.
  grunt.loadNpmTasks('grunt-phpcs');
  grunt.loadNpmTasks('grunt-phpmd');
  grunt.loadNpmTasks('grunt-phpspec');
  grunt.loadNpmTasks('grunt-behat');
  grunt.loadNpmTasks('grunt-contrib-watch');

  // Default task.
  grunt.registerTask('default', ['phpcs', 'phpmd', 'phpspec', 'behat']);

};

@@ -844,16 +844,24 @@
 specs %25%3E
+**/*.php
 ',%0A     
@@ -1341,11 +1341,92 @@
 at'%5D);%0A%0A
+  // Pre-commit task.%0A  grunt.registerTask('pre-commit', %5B'phpcs', 'phpspec'%5D);%0A%0A
 %7D;%0A

Exclude phpmd and behat from pre-commit hook