Code Duplication    Length = 7-7 lines in 2 locations

core/EE_Registry.core.php 2 locations

@@ 690-696 (lines=7) @@
687
        // $this->_cache_on is toggled during the recursive loading that can occur with dependency injection
688
        // $cache is controlled by individual calls to separate Registry loader methods like load_class()
689
        // $load_only is also controlled by individual calls to separate Registry loader methods like load_file()
690
        if ($this->_cache_on && $cache && ! $load_only) {
691
            // return object if it's already cached
692
            $cached_class = $this->_get_cached_class($class_name, $addon);
693
            if ($cached_class !== null) {
694
                return $cached_class;
695
            }
696
        }
697
        // instantiate the requested object
698
        $class_obj = $this->_create_object($class_name, $arguments, $addon, $from_db);
699
        if ($this->_cache_on && $cache) {
@@ 756-762 (lines=7) @@
753
        // $this->_cache_on is toggled during the recursive loading that can occur with dependency injection
754
        // $cache is controlled by individual calls to separate Registry loader methods like load_class()
755
        // $load_only is also controlled by individual calls to separate Registry loader methods like load_file()
756
        if ($this->_cache_on && $cache && ! $load_only) {
757
            // return object if it's already cached
758
            $cached_class = $this->_get_cached_class($class_name, $class_prefix);
759
            if ($cached_class !== null) {
760
                return $cached_class;
761
            }
762
        }
763
        // if the class doesn't already exist.. then we need to try and find the file and load it
764
        if (! $class_exists) {
765
            // get full path to file