]> source.dussan.org Git - nextcloud-server.git/commitdiff
Correctly only send the errors of the current file to the event
authorJoas Schilling <nickvergessen@owncloud.com>
Thu, 26 Mar 2015 14:33:31 +0000 (15:33 +0100)
committerJoas Schilling <nickvergessen@owncloud.com>
Thu, 26 Mar 2015 14:33:31 +0000 (15:33 +0100)
lib/private/app/codechecker.php

index dbec53579a88d07c64eef0bcda83024dba600763..f9d24be6ad150e38a9b12c0cde7974cc11ccd4ac 100644 (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;