$total =
iterator_count($iterator);
} $count = 0;
$maxCount = 5000;
$startTime =
time();
/** @var SplFileInfo $path */
foreach ($iterator as $path) { $targetFile =
$inflector->
createTargetPath($path);
$backupFile =
$inflector->
createBackupPath($path);
$sourceFile =
$inflector->
createSourcePath($path);
if (time() -
$startTime >= 5 ||
$count >=
$maxCount) { return new ValidResult($offset +
$count + 1,
$total);
} ++
$count;
if ($this->isDebug
) { // Just remove the update file
$localFs->
delete($sourceFile);
} else {