Correctly only send the errors of the current file to the event
This commit is contained in:
parent
0d786c381b
commit
db763027bb
1 changed files with 3 additions and 2 deletions
|
@ -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…
Reference in a new issue