original_string: public function invoke(callable $function, array $parameters = [])
      {
          $reflection = $this->reflectionTools->getReflectionFunction($function);
          $parameters = $this->getFunctionParameters($reflection, $parameters);
  
          return call_user_func_array($function, $parameters);
      }
code: public function invoke(callable $function, array $parameters = [])
      {
          $reflection = $this->reflectionTools->getReflectionFunction($function);
          $parameters = $this->getFunctionParameters($reflection, $parameters);
  
          return call_user_func_array($function, $parameters);
      }
code_tokens: public function invoke ( callable $ function , array $ parameters = [ ] ) { $ reflection = $ this -> reflectionTools -> getReflectionFunction ( $ function ) ; $ parameters = $ this -> getFunctionParameters ( $ reflection , $ parameters ) ; return call_user_func_array ( $ function , $ parameters ) ; }
docstring: Invokes a function after resolving its parameters.
  
  If the given parameters match the function parameter names, the given values are used.
  Otherwise, the function parameters are resolved using the ValueResolver.
  
  @param callable $function   The function to invoke.
  @param array    $parameters An associative array of values for the function parameters.
  
  @return mixed The result of the function call.
  
  @throws UnresolvedValueException If a function parameter could not be resolved.
docstring_tokens: Invokes a function after resolving its parameters .