code: protected function getFunctionArguments(ReflectionFunctionAbstract $func, array $params = array())
  	{
  		$args = [];
  
  		foreach ($func->getParameters() as $param) {
  			$class = $param->getClass();
  
  			if ($class) {
  				$args[] = $this->resolveClassArg($class, $param, $params);
  			} else {
  				$args[] = $this->resolveNonClassArg($param, $params, $func);
  			}
  		}
  
  		return $args;
  	}
docs: Get an array of arguments to a function, resolving type-hinted arguments
  automatically on the way.
  
  @param  ReflectionFunctionAbstract $func
  @param  array                      $params
  
  @return array
  
  @throws Exception\UnresolvableArgumentException If any of the arguments are not type-hinted, does not have a default value and is not specified in $params