original_string: public static function resolveAliases(array $parameters, array $aliases)
  	{
  		if ( !isset($parameters['alias']) ) {
  			return $parameters;
  		}
  
  		$browser_alias = $parameters['alias'];
  		unset($parameters['alias']);
  
  		if ( isset($aliases[$browser_alias]) ) {
  			$candidate_params = self::arrayMergeRecursive($aliases[$browser_alias], $parameters);
  
  			return self::resolveAliases($candidate_params, $aliases);
  		}
  
  		throw new \InvalidArgumentException(sprintf('Unable to resolve "%s" browser alias', $browser_alias));
  	}
code: public static function resolveAliases(array $parameters, array $aliases)
  	{
  		if ( !isset($parameters['alias']) ) {
  			return $parameters;
  		}
  
  		$browser_alias = $parameters['alias'];
  		unset($parameters['alias']);
  
  		if ( isset($aliases[$browser_alias]) ) {
  			$candidate_params = self::arrayMergeRecursive($aliases[$browser_alias], $parameters);
  
  			return self::resolveAliases($candidate_params, $aliases);
  		}
  
  		throw new \InvalidArgumentException(sprintf('Unable to resolve "%s" browser alias', $browser_alias));
  	}
code_tokens: public static function resolveAliases ( array $ parameters , array $ aliases ) { if ( ! isset ( $ parameters [ 'alias' ] ) ) { return $ parameters ; } $ browser_alias = $ parameters [ 'alias' ] ; unset ( $ parameters [ 'alias' ] ) ; if ( isset ( $ aliases [ $ browser_alias ] ) ) { $ candidate_params = self :: arrayMergeRecursive ( $ aliases [ $ browser_alias ] , $ parameters ) ; return self :: resolveAliases ( $ candidate_params , $ aliases ) ; } throw new \ InvalidArgumentException ( sprintf ( 'Unable to resolve "%s" browser alias' , $ browser_alias ) ) ; }
docstring: Resolves browser alias into corresponding browser configuration.
  
  @param array $parameters Browser configuration.
  @param array $aliases    Browser configuration aliases.
  
  @return array
  @throws \InvalidArgumentException When unable to resolve used browser alias.
docstring_tokens: Resolves browser alias into corresponding browser configuration .