Code Duplication    Length = 17-18 lines in 2 locations

src/Oro/Bundle/TrackingBundle/Processor/TrackingProcessor.php 2 locations

@@ 133-149 (lines=17) @@
130
131
        $this->logger->info('Recheck previous visit identifiers...');
132
        $totalEvents = $this->getIdentifyPrevVisitsCount();
133
        if ($totalEvents > 0) {
134
            $totalBatches           = number_format(ceil($totalEvents / $this->getBatchSize()));
135
            $this->processedBatches = 0;
136
            $this->logger->info(
137
                sprintf(
138
                    '<info>Total previous visit identifiers to be processed - %s (%s batches).</info>',
139
                    number_format($totalEvents),
140
                    $totalBatches
141
                )
142
            );
143
            while ($this->identifyPrevVisits()) {
144
                $this->logBatch(++$this->processedBatches, $totalBatches);
145
                if ($this->checkMaxExecutionTime()) {
146
                    return;
147
                }
148
            }
149
        }
150
151
        $this->logger->info('Recheck previous visit events...');
152
        $totalEvents = $this->getIdentifyPrevVisitEventsCount();
@@ 153-170 (lines=18) @@
150
151
        $this->logger->info('Recheck previous visit events...');
152
        $totalEvents = $this->getIdentifyPrevVisitEventsCount();
153
        if ($totalEvents > 0) {
154
            $totalBatches           = number_format(ceil($totalEvents / $this->getBatchSize()));
155
            $this->processedBatches = 0;
156
            $this->logger->info(
157
                sprintf(
158
                    '<info>Total previous visit events to be processed - %s (%s batches).</info>',
159
                    number_format($totalEvents),
160
                    $totalBatches
161
                )
162
            );
163
            $this->skipList = [];
164
            while ($this->identifyPrevVisitEvents()) {
165
                $this->logBatch(++$this->processedBatches, $totalBatches);
166
                if ($this->checkMaxExecutionTime()) {
167
                    return;
168
                }
169
            }
170
        }
171
172
        $this->logger->info('<info>Done</info>');
173
    }