src/Robo/Commands/Validate/PhpcsCommand.php
public function sniffFileList($file_list) {
    $this->say("Sniffing directories containing changed files...");
    $files = explode("\n", $file_list);
    $files = array_filter($files);
    if ($files) {
      $temp_path = $this->getConfigValue('repo.root') . '/tmp/phpcs-fileset';
      $this->taskWriteToFile($temp_path)
        ->lines($files)
        ->run();
      $arguments = "--file-list='$temp_path' -l";
      $exit_code = $this->doSniff($arguments);
      unlink($temp_path);

      return $exit_code;
    }

    return 0;
  }
public function sniffFileList($file_list) {
    $this->say("Sniffing directories containing changed files...");
    $files = explode("\n", $file_list);
    $files = array_filter($files);
    if ($files) {
      $temp_path = $this->getConfigValue('repo.root') . '/tmp/phpcs-fileset';
      $this->taskWriteToFile($temp_path)
        ->lines($files)
        ->run();
      $arguments = "--file-list='$temp_path' -l";
      $exit_code = $this->doSniff($arguments);
      unlink($temp_path);

      return $exit_code;
    }

    return 0;
  }
public function sniffFileList ( $ file_list ) { $ this -> say ( "Sniffing directories containing changed files..." ) ; $ files = explode ( "\n" , $ file_list ) ; $ files = array_filter ( $ files ) ; if ( $ files ) { $ temp_path = $ this -> getConfigValue ( 'repo.root' ) . '/tmp/phpcs-fileset' ; $ this -> taskWriteToFile ( $ temp_path ) -> lines ( $ files ) -> run ( ) ; $ arguments = "--file-list='$temp_path' -l" ; $ exit_code = $ this -> doSniff ( $ arguments ) ; unlink ( $ temp_path ) ; return $ exit_code ; } return 0 ; }
Executes PHP Code Sniffer against a list of files, if in phpcs.filesets.

This command will execute PHP Codesniffer against a list of files if those
files are a subset of the phpcs.filesets filesets.

@command tests:phpcs:sniff:files
@aliases tpsf

@param string $file_list
A list of files to scan, separated by \n.

@return int
Executes PHP Code Sniffer against a list of files if in phpcs . filesets .