From: Joas Schilling Date: Thu, 26 Mar 2015 14:33:31 +0000 (+0100) Subject: Correctly only send the errors of the current file to the event X-Git-Tag: v8.1.0alpha1~166^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=db763027bbac7029c36f9bfb2e140ca152df2f46;p=nextcloud-server.git Correctly only send the errors of the current file to the event --- diff --git a/lib/private/app/codechecker.php b/lib/private/app/codechecker.php index dbec53579a8..f9d24be6ad1 100644 --- a/lib/private/app/codechecker.php +++ b/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;