original_string: private function createEncoder(array $config)
      {
          if (isset($config['algorithm'])) {
              $config = $this->getEncoderConfigFromAlgorithm($config);
          }
          if (!isset($config['class'])) {
              throw new \InvalidArgumentException(sprintf('"class" must be set in %s.', json_encode($config)));
          }
          if (!isset($config['arguments'])) {
              throw new \InvalidArgumentException(sprintf('"arguments" must be set in %s.', json_encode($config)));
          }
  
          $reflection = new \ReflectionClass($config['class']);
  
          return $reflection->newInstanceArgs($config['arguments']);
      }
code: private function createEncoder(array $config)
      {
          if (isset($config['algorithm'])) {
              $config = $this->getEncoderConfigFromAlgorithm($config);
          }
          if (!isset($config['class'])) {
              throw new \InvalidArgumentException(sprintf('"class" must be set in %s.', json_encode($config)));
          }
          if (!isset($config['arguments'])) {
              throw new \InvalidArgumentException(sprintf('"arguments" must be set in %s.', json_encode($config)));
          }
  
          $reflection = new \ReflectionClass($config['class']);
  
          return $reflection->newInstanceArgs($config['arguments']);
      }
code_tokens: private function createEncoder ( array $ config ) { if ( isset ( $ config [ 'algorithm' ] ) ) { $ config = $ this -> getEncoderConfigFromAlgorithm ( $ config ) ; } if ( ! isset ( $ config [ 'class' ] ) ) { throw new \ InvalidArgumentException ( sprintf ( '"class" must be set in %s.' , json_encode ( $ config ) ) ) ; } if ( ! isset ( $ config [ 'arguments' ] ) ) { throw new \ InvalidArgumentException ( sprintf ( '"arguments" must be set in %s.' , json_encode ( $ config ) ) ) ; } $ reflection = new \ ReflectionClass ( $ config [ 'class' ] ) ; return $ reflection -> newInstanceArgs ( $ config [ 'arguments' ] ) ; }
docstring: Creates the actual encoder instance.
  
  @return PasswordEncoderInterface
  
  @throws \InvalidArgumentException
docstring_tokens: Creates the actual encoder instance .