Code Duplication    Length = 7-7 lines in 2 locations

core/EE_Registry.core.php 2 locations

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