Code Duplication    Length = 7-7 lines in 2 locations

core/EE_Registry.core.php 2 locations

@@ 698-704 (lines=7) @@
695
        // $this->_cache_on is toggled during the recursive loading that can occur with dependency injection
696
        // $cache is controlled by individual calls to separate Registry loader methods like load_class()
697
        // $load_only is also controlled by individual calls to separate Registry loader methods like load_file()
698
        if ($this->_cache_on && $cache && ! $load_only) {
699
            // return object if it's already cached
700
            $cached_class = $this->_get_cached_class($class_name, $addon);
701
            if ($cached_class !== null) {
702
                return $cached_class;
703
            }
704
        }
705
        // obtain the loader method from the dependency map
706
        $loader = $this->_dependency_map->class_loader($class_name);
707
        // instantiate the requested object
@@ 808-814 (lines=7) @@
805
        // $this->_cache_on is toggled during the recursive loading that can occur with dependency injection
806
        // $cache is controlled by individual calls to separate Registry loader methods like load_class()
807
        // $load_only is also controlled by individual calls to separate Registry loader methods like load_file()
808
        if ($this->_cache_on && $cache && ! $load_only) {
809
            // return object if it's already cached
810
            $cached_class = $this->_get_cached_class($class_name, $class_prefix);
811
            if ($cached_class !== null) {
812
                return $cached_class;
813
            }
814
        }
815
        // if the class doesn't already exist.. then we need to try and find the file and load it
816
        if (! $class_exists) {
817
            // get full path to file