lib/components/dataInterface/DataSource.php
public function reduceRemaining(DataItem $dataItem)
    {
        $n = 0;
        // if foreign (handle does foreign -> local)
        if ($dataItem->isForeign && in_array($this->settings['direction'], ['to_local', 'both'])) {
            $n++;
        }

        // if local (handle does local -> foreign)
        if (!$dataItem->isForeign && in_array($this->settings['direction'], ['to_foreign', 'both'])) {
            $n++;
        }
        $this->task->reduceRemaining($n);
    }
public function reduceRemaining(DataItem $dataItem)
    {
        $n = 0;
        // if foreign (handle does foreign -> local)
        if ($dataItem->isForeign && in_array($this->settings['direction'], ['to_local', 'both'])) {
            $n++;
        }

        // if local (handle does local -> foreign)
        if (!$dataItem->isForeign && in_array($this->settings['direction'], ['to_foreign', 'both'])) {
            $n++;
        }
        $this->task->reduceRemaining($n);
    }
[[@doctodo method_description:reduceRemaining]].

@param cascade\components\dataInterface\DataItem $dataItem [[@doctodo param_description:dataItem]]