original_string: protected function prepareArguments($reflection_parameter, $arguments) {
  		$array_type = $this->getArrayType($arguments);
  		$prepared = array();
  
  		if ($array_type == self::ARRAY_TYPE_LIST) {
  			$prepared = $arguments;
  		} elseif ($array_type == self::ARRAY_TYPE_DICT) {
  			foreach ($reflection_parameter as $parameter) {
  				$name = $parameter->getName();
  
  				if (isset($arguments[$name])) {
  					$value = $arguments[$name];
  				} else if ($parameter->isDefaultValueAvailable()) {
  					$value = $parameter->getDefaultValue();
  				} else {
  					throw new InvalidParameterException("Missing parameter '$name' on position {$parameter->getPosition()}");
  				}
  
  				$prepared[] = $value;
  			}
  		} else {
  			throw new InvalidParameterException('Unable to handle mixed arrays');
  		}
  
  		return $prepared;
  	}
code: protected function prepareArguments($reflection_parameter, $arguments) {
  		$array_type = $this->getArrayType($arguments);
  		$prepared = array();
  
  		if ($array_type == self::ARRAY_TYPE_LIST) {
  			$prepared = $arguments;
  		} elseif ($array_type == self::ARRAY_TYPE_DICT) {
  			foreach ($reflection_parameter as $parameter) {
  				$name = $parameter->getName();
  
  				if (isset($arguments[$name])) {
  					$value = $arguments[$name];
  				} else if ($parameter->isDefaultValueAvailable()) {
  					$value = $parameter->getDefaultValue();
  				} else {
  					throw new InvalidParameterException("Missing parameter '$name' on position {$parameter->getPosition()}");
  				}
  
  				$prepared[] = $value;
  			}
  		} else {
  			throw new InvalidParameterException('Unable to handle mixed arrays');
  		}
  
  		return $prepared;
  	}
code_tokens: protected function prepareArguments ( $ reflection_parameter , $ arguments ) { $ array_type = $ this -> getArrayType ( $ arguments ) ; $ prepared = array ( ) ; if ( $ array_type == self :: ARRAY_TYPE_LIST ) { $ prepared = $ arguments ; } elseif ( $ array_type == self :: ARRAY_TYPE_DICT ) { foreach ( $ reflection_parameter as $ parameter ) { $ name = $ parameter -> getName ( ) ; if ( isset ( $ arguments [ $ name ] ) ) { $ value = $ arguments [ $ name ] ; } else if ( $ parameter -> isDefaultValueAvailable ( ) ) { $ value = $ parameter -> getDefaultValue ( ) ; } else { throw new InvalidParameterException ( "Missing parameter '$name' on position {$parameter->getPosition()}" ) ; } $ prepared [ ] = $ value ; } } else { throw new InvalidParameterException ( 'Unable to handle mixed arrays' ) ; } return $ prepared ; }
docstring: Prepares the argument array for use with call_user_func_array
  
  @param \ReflectionParameter[] $reflection_parameter
  @param array $arguments
  
  @return array
  @throws InvalidParameterException
docstring_tokens: Prepares the argument array for use with call_user_func_array