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

remotes/origin/versions-cleanup
Joas Schilling 11 years ago
parent 0d786c381b
commit db763027bb
  1. 5
      lib/private/app/codechecker.php

@ -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;

Loading…
Cancel
Save