original_string: private function getFunctionParameters(string $onEvent, callable $function, array $objects) : array
      {
          $parameters = [];
  
          $reflectionFunction = $this->reflectionTools->getReflectionFunction($function);
  
          foreach ($reflectionFunction->getParameters() as $reflectionParameter) {
              $parameterClass = $reflectionParameter->getClass();
  
              if ($parameterClass !== null) {
                  $parameterClassName = $parameterClass->getName();
  
                  if (isset($objects[$parameterClassName])) {
                      $parameters[] = $objects[$parameterClassName];
  
                      continue;
                  }
              }
  
              throw $this->cannotResolveParameter($onEvent, array_keys($objects), $reflectionParameter);
          }
  
          return $parameters;
      }
code: private function getFunctionParameters(string $onEvent, callable $function, array $objects) : array
      {
          $parameters = [];
  
          $reflectionFunction = $this->reflectionTools->getReflectionFunction($function);
  
          foreach ($reflectionFunction->getParameters() as $reflectionParameter) {
              $parameterClass = $reflectionParameter->getClass();
  
              if ($parameterClass !== null) {
                  $parameterClassName = $parameterClass->getName();
  
                  if (isset($objects[$parameterClassName])) {
                      $parameters[] = $objects[$parameterClassName];
  
                      continue;
                  }
              }
  
              throw $this->cannotResolveParameter($onEvent, array_keys($objects), $reflectionParameter);
          }
  
          return $parameters;
      }
code_tokens: private function getFunctionParameters ( string $ onEvent , callable $ function , array $ objects ) : array { $ parameters = [ ] ; $ reflectionFunction = $ this -> reflectionTools -> getReflectionFunction ( $ function ) ; foreach ( $ reflectionFunction -> getParameters ( ) as $ reflectionParameter ) { $ parameterClass = $ reflectionParameter -> getClass ( ) ; if ( $ parameterClass !== null ) { $ parameterClassName = $ parameterClass -> getName ( ) ; if ( isset ( $ objects [ $ parameterClassName ] ) ) { $ parameters [ ] = $ objects [ $ parameterClassName ] ; continue ; } } throw $ this -> cannotResolveParameter ( $ onEvent , array_keys ( $ objects ) , $ reflectionParameter ) ; } return $ parameters ; }
docstring: Resolves the parameters to call the given function.
  
  @param string   $onEvent  'onBefore' or 'onAfter'.
  @param callable $function The function to resolve.
  @param object[] $objects  An associative array of available objects, indexed by their class or interface name.
  
  @return array
  
  @throws HttpInternalServerErrorException If the function requires a parameter that is not available.
docstring_tokens: Resolves the parameters to call the given function .