app/Module/BatchUpdateModule.php
private function findPrevXref(BatchUpdateBasePlugin $plugin, string $xref, array $all_data, Tree $tree): string
    {
        foreach (array_reverse($all_data) as $key => $value) {
            if ($key > $xref) {
                $record = $this->getRecord($all_data[$key], $tree);
                if ($plugin->doesRecordNeedUpdate($record)) {
                    return $key;
                }
            }
        }

        return '';
    }
private function findPrevXref(BatchUpdateBasePlugin $plugin, string $xref, array $all_data, Tree $tree): string
    {
        foreach (array_reverse($all_data) as $key => $value) {
            if ($key > $xref) {
                $record = $this->getRecord($all_data[$key], $tree);
                if ($plugin->doesRecordNeedUpdate($record)) {
                    return $key;
                }
            }
        }

        return '';
    }
private function findPrevXref ( BatchUpdateBasePlugin $ plugin , string $ xref , array $ all_data , Tree $ tree ) : string { foreach ( array_reverse ( $ all_data ) as $ key => $ value ) { if ( $ key > $ xref ) { $ record = $ this -> getRecord ( $ all_data [ $ key ] , $ tree ) ; if ( $ plugin -> doesRecordNeedUpdate ( $ record ) ) { return $ key ; } } } return '' ; }
Find the previous record that needs to be updated.

@param BatchUpdateBasePlugin $plugin
@param string                $xref
@param array                 $all_data
@param Tree                  $tree

@return string
Find the previous record that needs to be updated .