Code Duplication    Length = 8-9 lines in 2 locations

src/DoctrineWriter.php 2 locations

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