Correctly only send the errors of the current file to the event

This commit is contained in:
Joas Schilling 2015-03-26 15:33:31 +01:00
parent 0d786c381b
commit db763027bb
1 changed files with 3 additions and 2 deletions

View File

@ -103,8 +103,9 @@ class CodeChecker extends BasicEmitter {
foreach ($iterator as $file) {
/** @var SplFileInfo $file */
$this->emit('CodeChecker', 'analyseFileBegin', [$file->getPathname()]);
$errors = array_merge($this->analyseFile($file), $errors);
$this->emit('CodeChecker', 'analyseFileFinished', [$errors]);
$fileErrors = $this->analyseFile($file);
$this->emit('CodeChecker', 'analyseFileFinished', [$fileErrors]);
$errors = array_merge($fileErrors, $errors);
}
return $errors;