original_string: public function inherit() {
      
      if ((bool)Config::getOption("plugins.dataInheritance.enabled")) {
        
        $storeData        = Data::get();
        $storePatternData = PatternData::get();
        
        foreach ($storePatternData as $patternStoreKey => $patternData) {
          
          if (isset($patternData["lineages"]) && (count($patternData["lineages"]) > 0)) {
            
            $dataLineage = array();
            
            foreach($patternData["lineages"] as $lineage) {
              
              // merge the lineage data with the lineage store. newer/higher-level data is more important.
              $lineageKey  = $lineage["lineagePattern"];
              $lineageData = isset($storeData["patternSpecific"][$lineageKey]) && isset($storeData["patternSpecific"][$lineageKey]["data"]) ? $storeData["patternSpecific"][$lineageKey]["data"] : array();
              if (!empty($lineageData)) {
                $dataLineage = array_replace_recursive($dataLineage, $lineageData);
              }
              
            }
            
            // merge the lineage data with the pattern data. pattern data is more important.
            $dataPattern = isset($storeData["patternSpecific"][$patternStoreKey]) && isset($storeData["patternSpecific"][$patternStoreKey]["data"]) ? $storeData["patternSpecific"][$patternStoreKey]["data"] : array();
            $dataPattern = array_replace_recursive($dataLineage, $dataPattern);
            
            if (!empty($dataPattern)) {
              $storeData["patternSpecific"][$patternStoreKey]["data"] = $dataPattern;
            }
            
          }
          
        }
        
        Data::replaceStore($storeData);
        
      }
      
    }
code: public function inherit() {
      
      if ((bool)Config::getOption("plugins.dataInheritance.enabled")) {
        
        $storeData        = Data::get();
        $storePatternData = PatternData::get();
        
        foreach ($storePatternData as $patternStoreKey => $patternData) {
          
          if (isset($patternData["lineages"]) && (count($patternData["lineages"]) > 0)) {
            
            $dataLineage = array();
            
            foreach($patternData["lineages"] as $lineage) {
              
              // merge the lineage data with the lineage store. newer/higher-level data is more important.
              $lineageKey  = $lineage["lineagePattern"];
              $lineageData = isset($storeData["patternSpecific"][$lineageKey]) && isset($storeData["patternSpecific"][$lineageKey]["data"]) ? $storeData["patternSpecific"][$lineageKey]["data"] : array();
              if (!empty($lineageData)) {
                $dataLineage = array_replace_recursive($dataLineage, $lineageData);
              }
              
            }
            
            // merge the lineage data with the pattern data. pattern data is more important.
            $dataPattern = isset($storeData["patternSpecific"][$patternStoreKey]) && isset($storeData["patternSpecific"][$patternStoreKey]["data"]) ? $storeData["patternSpecific"][$patternStoreKey]["data"] : array();
            $dataPattern = array_replace_recursive($dataLineage, $dataPattern);
            
            if (!empty($dataPattern)) {
              $storeData["patternSpecific"][$patternStoreKey]["data"] = $dataPattern;
            }
            
          }
          
        }
        
        Data::replaceStore($storeData);
        
      }
      
    }
code_tokens: public function inherit ( ) { if ( ( bool ) Config :: getOption ( "plugins.dataInheritance.enabled" ) ) { $ storeData = Data :: get ( ) ; $ storePatternData = PatternData :: get ( ) ; foreach ( $ storePatternData as $ patternStoreKey => $ patternData ) { if ( isset ( $ patternData [ "lineages" ] ) && ( count ( $ patternData [ "lineages" ] ) > 0 ) ) { $ dataLineage = array ( ) ; foreach ( $ patternData [ "lineages" ] as $ lineage ) { // merge the lineage data with the lineage store. newer/higher-level data is more important. $ lineageKey = $ lineage [ "lineagePattern" ] ; $ lineageData = isset ( $ storeData [ "patternSpecific" ] [ $ lineageKey ] ) && isset ( $ storeData [ "patternSpecific" ] [ $ lineageKey ] [ "data" ] ) ? $ storeData [ "patternSpecific" ] [ $ lineageKey ] [ "data" ] : array ( ) ; if ( ! empty ( $ lineageData ) ) { $ dataLineage = array_replace_recursive ( $ dataLineage , $ lineageData ) ; } } // merge the lineage data with the pattern data. pattern data is more important. $ dataPattern = isset ( $ storeData [ "patternSpecific" ] [ $ patternStoreKey ] ) && isset ( $ storeData [ "patternSpecific" ] [ $ patternStoreKey ] [ "data" ] ) ? $ storeData [ "patternSpecific" ] [ $ patternStoreKey ] [ "data" ] : array ( ) ; $ dataPattern = array_replace_recursive ( $ dataLineage , $ dataPattern ) ; if ( ! empty ( $ dataPattern ) ) { $ storeData [ "patternSpecific" ] [ $ patternStoreKey ] [ "data" ] = $ dataPattern ; } } } Data :: replaceStore ( $ storeData ) ; } }
docstring: Look up data in lineages, update pattern store data, replace store
docstring_tokens: Look up data in lineages update pattern store data replace store