Code Duplication    Length = 7-7 lines in 2 locations

core/EE_Registry.core.php 2 locations

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