Merge pull request #15224 from owncloud/issue/15191-app-code-checker-error-list

Correctly only send the errors of the current file to the event
This commit is contained in:
Joas Schilling 2015-03-26 16:35:46 +01:00
commit 39dbf9509b
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;