original_string: protected function _resolveMethodAliases($key, $defaults, $config)
      {
          if (!isset($defaults[$key], $config[$key])) {
              return $config;
          }
          if (isset($config[$key]) && $config[$key] === []) {
              $this->setConfig($key, [], false);
              unset($config[$key]);
  
              return $config;
          }
  
          $indexed = array_flip($defaults[$key]);
          $indexedCustom = array_flip($config[$key]);
          foreach ($indexed as $method => $alias) {
              if (!isset($indexedCustom[$method])) {
                  $indexedCustom[$method] = $alias;
              }
          }
          $this->setConfig($key, array_flip($indexedCustom), false);
          unset($config[$key]);
  
          return $config;
      }
code: protected function _resolveMethodAliases($key, $defaults, $config)
      {
          if (!isset($defaults[$key], $config[$key])) {
              return $config;
          }
          if (isset($config[$key]) && $config[$key] === []) {
              $this->setConfig($key, [], false);
              unset($config[$key]);
  
              return $config;
          }
  
          $indexed = array_flip($defaults[$key]);
          $indexedCustom = array_flip($config[$key]);
          foreach ($indexed as $method => $alias) {
              if (!isset($indexedCustom[$method])) {
                  $indexedCustom[$method] = $alias;
              }
          }
          $this->setConfig($key, array_flip($indexedCustom), false);
          unset($config[$key]);
  
          return $config;
      }
code_tokens: protected function _resolveMethodAliases ( $ key , $ defaults , $ config ) { if ( ! isset ( $ defaults [ $ key ] , $ config [ $ key ] ) ) { return $ config ; } if ( isset ( $ config [ $ key ] ) && $ config [ $ key ] === [ ] ) { $ this -> setConfig ( $ key , [ ] , false ) ; unset ( $ config [ $ key ] ) ; return $ config ; } $ indexed = array_flip ( $ defaults [ $ key ] ) ; $ indexedCustom = array_flip ( $ config [ $ key ] ) ; foreach ( $ indexed as $ method => $ alias ) { if ( ! isset ( $ indexedCustom [ $ method ] ) ) { $ indexedCustom [ $ method ] = $ alias ; } } $ this -> setConfig ( $ key , array_flip ( $ indexedCustom ) , false ) ; unset ( $ config [ $ key ] ) ; return $ config ; }
docstring: Removes aliased methods that would otherwise be duplicated by userland configuration.
  
  @param string $key The key to filter.
  @param array $defaults The default method mappings.
  @param array $config The customized method mappings.
  @return array A de-duped list of config data.
docstring_tokens: Removes aliased methods that would otherwise be duplicated by userland configuration .