public function cswExecute()
{
// PHP_CodeSniffer - silent prepare
ob_start();
$this->setTokenListeners($this->cswStandard, array());
$this->populateCustomRules();
$this->populateTokenListeners();
$tlisteners = $this->getTokenSniffs();
ob_end_clean();
// PHP_CodeSniffer - silent process each item and collect results
foreach ($this->cswData as $index => $item) {
ob_start();
$pcsFile = new PHP_CodeSniffer_File('', $tlisteners['file'], $this->allowedFileExtensions, $this->ruleset, $this);
$pcsFile->start($item['code']);
$this->cswData[$index]['output'] = $this->storeOutput ? ob_get_contents() : 'output disabled';
ob_end_clean();
// free some memory
unset($this->cswData[$index]['code']);
// prepare full report
$this->cswData[$index]['messages'] = $this->mergeMessages($pcsFile->getErrors(), $pcsFile->getWarnings(), $item['code_lines']);
// prepare report for lines
$this->cswData[$index]['report_for_lines'] = $this->createReportForLines($this->cswData[$index]);
}
// return data
return $this->cswData;
}