Index: Gruntfile.js
===================================================================
--- Gruntfile.js	(revision 42218)
+++ Gruntfile.js	(working copy)
@@ -470,6 +470,18 @@
 				args: ['--verbose', '-c', 'phpunit.xml.dist', '--group', 'restapi-jsclient']
 			}
 		},
+		phpcs: {
+			core: {
+				cmd: 'phpcs',
+				args: ['--standard=phpcs.xml.dist', '--report-summary', '--report-source']
+			}
+		},
+		phpcbf: {
+			core: {
+				cmd: 'phpcbf',
+				args: ['--standard=phpcs.xml.dist', '--report-summary', '--report-source']
+			}
+		},
 		uglify: {
 			options: {
 				ASCIIOnly: true,
@@ -950,6 +962,22 @@
 		}, this.async());
 	});
 
+	grunt.registerMultiTask('phpcs', 'Runs PHPCS using phpcs.xml.dist.', function() {
+		grunt.util.spawn({
+			cmd: this.data.cmd,
+			args: this.data.args,
+			opts: {stdio: 'inherit'}
+		}, this.async());
+	});
+
+	grunt.registerMultiTask('phpcbf', 'Runs PHPCBF using phpcs.xml.dist.', function() {
+		grunt.util.spawn({
+			cmd: this.data.cmd,
+			args: this.data.args,
+			opts: {stdio: 'inherit'}
+		}, this.async());
+	});
+
 	grunt.registerTask('qunit:compiled', 'Runs QUnit tests on compiled as well as uncompiled scripts.',
 		['build', 'copy:qunit', 'qunit']);
 
