original_string: protected function setHandlerByExtension($extension)
      {
          if (!in_array($extension, $this->file->supportedExtensions())) {
              throw new RuntimeException($this->translation->text('Unsupported file extension'));
          }
  
          return $this->handler = $this->file->getHandler(".$extension");
      }
code: protected function setHandlerByExtension($extension)
      {
          if (!in_array($extension, $this->file->supportedExtensions())) {
              throw new RuntimeException($this->translation->text('Unsupported file extension'));
          }
  
          return $this->handler = $this->file->getHandler(".$extension");
      }
code_tokens: protected function setHandlerByExtension ( $ extension ) { if ( ! in_array ( $ extension , $ this -> file -> supportedExtensions ( ) ) ) { throw new RuntimeException ( $ this -> translation -> text ( 'Unsupported file extension' ) ) ; } return $ this -> handler = $ this -> file -> getHandler ( ".$extension" ) ; }
docstring: Find and set handler by a file extension
  @param string $extension
  @return array
  @throws RuntimeException
docstring_tokens: Find and set handler by a file extension