original_string: protected function resolveArguments(
          ReflectionMethod $method,
          array $arguments
      ) {
          $params = $method->getParameters();
          $result = [];
  
          foreach ($params as $param) {
              /** @var ReflectionParameter $param */
              if (isset($arguments[$param->name])) {
                  $result[$param->name] = $arguments[$param->name];
                  continue;
              }
  
              $class = $param->getClass();
              if ($class) {
                  $className = $class->getName();
                  if ($this->isShared($className)) {
                      $result[$className] = isset($this->sharedInstances[$className])
                          ? $this->sharedInstances[$className]
                          : $this->get($className);
                  } else {
                      $result[$className] = $this->create($className);
                  }
              }
          }
  
          return $result;
      }
code: protected function resolveArguments(
          ReflectionMethod $method,
          array $arguments
      ) {
          $params = $method->getParameters();
          $result = [];
  
          foreach ($params as $param) {
              /** @var ReflectionParameter $param */
              if (isset($arguments[$param->name])) {
                  $result[$param->name] = $arguments[$param->name];
                  continue;
              }
  
              $class = $param->getClass();
              if ($class) {
                  $className = $class->getName();
                  if ($this->isShared($className)) {
                      $result[$className] = isset($this->sharedInstances[$className])
                          ? $this->sharedInstances[$className]
                          : $this->get($className);
                  } else {
                      $result[$className] = $this->create($className);
                  }
              }
          }
  
          return $result;
      }
code_tokens: protected function resolveArguments ( ReflectionMethod $ method , array $ arguments ) { $ params = $ method -> getParameters ( ) ; $ result = [ ] ; foreach ( $ params as $ param ) { /** @var ReflectionParameter $param */ if ( isset ( $ arguments [ $ param -> name ] ) ) { $ result [ $ param -> name ] = $ arguments [ $ param -> name ] ; continue ; } $ class = $ param -> getClass ( ) ; if ( $ class ) { $ className = $ class -> getName ( ) ; if ( $ this -> isShared ( $ className ) ) { $ result [ $ className ] = isset ( $ this -> sharedInstances [ $ className ] ) ? $ this -> sharedInstances [ $ className ] : $ this -> get ( $ className ) ; } else { $ result [ $ className ] = $ this -> create ( $ className ) ; } } } return $ result ; }
docstring: Resolve argument of method.
  
  @param ReflectionMethod $method
  @param array $arguments
  @return array
docstring_tokens: Resolve argument of method .