Commit db763027 authored by Joas Schilling's avatar Joas Schilling
Browse files

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

parent 0d786c38
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment