Code Duplication    Length = 7-7 lines in 2 locations

core/EE_Registry.core.php 2 locations

@@ 773-779 (lines=7) @@
770
        // $this->_cache_on is toggled during the recursive loading that can occur with dependency injection
771
        // $cache is controlled by individual calls to separate Registry loader methods like load_class()
772
        // $load_only is also controlled by individual calls to separate Registry loader methods like load_file()
773
        if ($this->_cache_on && $cache && ! $load_only) {
774
            // return object if it's already cached
775
            $cached_class = $this->_get_cached_class($class_name, $addon, $arguments);
776
            if ($cached_class !== null) {
777
                return $cached_class;
778
            }
779
        }// obtain the loader method from the dependency map
780
        $loader = $this->_dependency_map->class_loader($class_name);// instantiate the requested object
781
        if ($loader instanceof Closure) {
782
            $class_obj = $loader($arguments);
@@ 886-892 (lines=7) @@
883
        // $this->_cache_on is toggled during the recursive loading that can occur with dependency injection
884
        // $cache is controlled by individual calls to separate Registry loader methods like load_class()
885
        // $load_only is also controlled by individual calls to separate Registry loader methods like load_file()
886
        if ($this->_cache_on && $cache && ! $load_only) {
887
            // return object if it's already cached
888
            $cached_class = $this->_get_cached_class($class_name, $class_prefix, $arguments);
889
            if ($cached_class !== null) {
890
                return $cached_class;
891
            }
892
        }
893
        // if the class doesn't already exist.. then we need to try and find the file and load it
894
        if (! $class_exists) {
895
            // get full path to file