Code Duplication    Length = 8-9 lines in 2 locations

src/DoctrineWriter.php 2 locations

@@ 296-304 (lines=9) @@
293
    /**
294
     * Disable Doctrine logging
295
     */
296
    protected function disableLogging()
297
    {
298
        //TODO: do we need to add support for MongoDB logging?
299
        if (!($this->objectManager instanceof \Doctrine\ORM\EntityManager)) return;
300
301
        $config = $this->objectManager->getConnection()->getConfiguration();
302
        $this->originalLogger = $config->getSQLLogger();
303
        $config->setSQLLogger(null);
304
    }
305
306
    /**
307
     * Re-enable Doctrine logging
@@ 309-316 (lines=8) @@
306
    /**
307
     * Re-enable Doctrine logging
308
     */
309
    protected function reEnableLogging()
310
    {
311
        //TODO: do we need to add support for MongoDB logging?
312
        if (!($this->objectManager instanceof \Doctrine\ORM\EntityManager)) return;
313
314
        $config = $this->objectManager->getConnection()->getConfiguration();
315
        $config->setSQLLogger($this->originalLogger);
316
    }
317
318
    /**
319
     * @param array $item