Code Duplication    Length = 11-11 lines in 2 locations

lib/Doctrine/ORM/AbstractQuery.php 2 locations

@@ 492-502 (lines=11) @@
489
     *
490
     * @return static This query instance.
491
     */
492
    public function setHydrationCacheProfile(QueryCacheProfile $profile = null)
493
    {
494
        if ($profile !== null && ! $profile->getResultCacheDriver()) {
495
            $resultCacheDriver = $this->_em->getConfiguration()->getHydrationCacheImpl();
496
            $profile = $profile->setResultCacheDriver($resultCacheDriver);
497
        }
498
499
        $this->_hydrationCacheProfile = $profile;
500
501
        return $this;
502
    }
503
504
    /**
505
     * @return \Doctrine\DBAL\Cache\QueryCacheProfile
@@ 522-532 (lines=11) @@
519
     *
520
     * @return static This query instance.
521
     */
522
    public function setResultCacheProfile(QueryCacheProfile $profile = null)
523
    {
524
        if ( ! $profile->getResultCacheDriver()) {
525
            $resultCacheDriver = $this->_em->getConfiguration()->getResultCacheImpl();
526
            $profile = $profile->setResultCacheDriver($resultCacheDriver);
527
        }
528
529
        $this->_queryCacheProfile = $profile;
530
531
        return $this;
532
    }
533
534
    /**
535
     * Defines a cache driver to be used for caching result sets and implicitly enables caching.