Code Duplication    Length = 5-6 lines in 2 locations

src/Engines/TNTSearchEngine.php 2 locations

@@ 303-307 (lines=5) @@
300
    {
301
        $indexName = $model->searchableAs();
302
303
        if (!file_exists($this->tnt->config['storage']."/{$indexName}.index")) {
304
            $indexer = $this->tnt->createIndex("$indexName.index");
305
            $indexer->setDatabaseHandle($model->getConnection()->getPdo());
306
            $indexer->setPrimaryKey($model->getKeyName());
307
        }
308
        if ($this->geotnt && !file_exists($this->tnt->config['storage']."/{$indexName}.geoindex")) {
309
            $indexer = $this->geotnt->getIndex();
310
            $indexer->createIndex("$indexName.geoindex");
@@ 308-313 (lines=6) @@
305
            $indexer->setDatabaseHandle($model->getConnection()->getPdo());
306
            $indexer->setPrimaryKey($model->getKeyName());
307
        }
308
        if ($this->geotnt && !file_exists($this->tnt->config['storage']."/{$indexName}.geoindex")) {
309
            $indexer = $this->geotnt->getIndex();
310
            $indexer->createIndex("$indexName.geoindex");
311
            $indexer->setDatabaseHandle($model->getConnection()->getPdo());
312
            $indexer->setPrimaryKey($model->getKeyName());
313
        }
314
    }
315
316
    /**