Code Duplication    Length = 7-7 lines in 2 locations

core/EE_Registry.core.php 2 locations

@@ 608-614 (lines=7) @@
605
        // $this->_cache_on is toggled during the recursive loading that can occur with dependency injection
606
        // $cache is controlled by individual calls to separate Registry loader methods like load_class()
607
        // $load_only is also controlled by individual calls to separate Registry loader methods like load_file()
608
        if ($this->_cache_on && $cache && ! $load_only) {
609
            // return object if it's already cached
610
            $cached_class = $this->_get_cached_class($class_name, $addon);
611
            if ($cached_class !== null) {
612
                return $cached_class;
613
            }
614
        }
615
        // instantiate the requested object
616
        $class_obj = $this->_create_object($class_name, $arguments, $addon, $from_db);
617
        if ($this->_cache_on && $cache) {
@@ 672-678 (lines=7) @@
669
        // $this->_cache_on is toggled during the recursive loading that can occur with dependency injection
670
        // $cache is controlled by individual calls to separate Registry loader methods like load_class()
671
        // $load_only is also controlled by individual calls to separate Registry loader methods like load_file()
672
        if ($this->_cache_on && $cache && ! $load_only) {
673
            // return object if it's already cached
674
            $cached_class = $this->_get_cached_class($class_name, $class_prefix);
675
            if ($cached_class !== null) {
676
                return $cached_class;
677
            }
678
        }
679
        // if the class doesn't already exist.. then we need to try and find the file and load it
680
        if ( ! $class_exists) {
681
            // get full path to file