Skip to content

Commit 02c004e

Browse files
committed
Fix total changed
1 parent 12f50f2 commit 02c004e

3 files changed

Lines changed: 3 additions & 5 deletions

File tree

src/Console/Command/WorkerCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ private function runWorker(
158158
Bridge::FILES_COUNT => count($filePaths),
159159
Bridge::SYSTEM_ERRORS => $processResult->getSystemErrors(),
160160
Bridge::SYSTEM_ERRORS_COUNT => count($processResult->getSystemErrors()),
161-
Bridge::HAS_CHANGED => $processResult->hasChanged(),
161+
Bridge::TOTAL_CHANGED => $processResult->getTotalChanged(),
162162
],
163163
]);
164164
});

src/Parallel/Application/ParallelFileProcessor.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,7 @@ function (array $json) use (
191191
&$totalChanged
192192
): void {
193193

194-
if ($json[Bridge::HAS_CHANGED]) {
195-
++$totalChanged;
196-
}
194+
$totalChanged += $json[Bridge::TOTAL_CHANGED];
197195

198196
// decode arrays to objects
199197
foreach ($json[Bridge::SYSTEM_ERRORS] as $jsonError) {

src/Parallel/ValueObject/Bridge.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ final class Bridge
3737
/**
3838
* @var string
3939
*/
40-
public const HAS_CHANGED = 'has_changed';
40+
public const TOTAL_CHANGED = 'total_changed';
4141
}

0 commit comments

Comments
 (0)