reporters/fail.js
function(file, enc, callback) {
            var report = file.phpcsReport || {};

            if (report.error) {
                phpcsError = true;

                if (options.failOnFirst) {
                    var errorMessage = 'PHP Code Sniffer failed' +
                        ' on ' + chalk.magenta(file.path);

                    this.emit('error', new gutil.PluginError('gulp-phpcs', errorMessage));
                    callback();

                    return;
                }  else {
                    badFiles.push(chalk.magenta(file.path));
                }
            }

            this.push(file);
            callback();
        }
function(file, enc, callback) {
            var report = file.phpcsReport || {};

            if (report.error) {
                phpcsError = true;

                if (options.failOnFirst) {
                    var errorMessage = 'PHP Code Sniffer failed' +
                        ' on ' + chalk.magenta(file.path);

                    this.emit('error', new gutil.PluginError('gulp-phpcs', errorMessage));
                    callback();

                    return;
                }  else {
                    badFiles.push(chalk.magenta(file.path));
                }
            }

            this.push(file);
            callback();
        }
function ( file , enc , callback ) { var report = file . phpcsReport || { } ; if ( report . error ) { phpcsError = true ; if ( options . failOnFirst ) { var errorMessage = 'PHP Code Sniffer failed' + ' on ' + chalk . magenta ( file . path ) ; this . emit ( 'error' , new gutil . PluginError ( 'gulp-phpcs' , errorMessage ) ) ; callback ( ) ; return ; } else { badFiles . push ( chalk . magenta ( file . path ) ) ; } } this . push ( file ) ; callback ( ) ; }
Watch for errors
Watch for errors