original_string: protected function templateExists($template)
      {
          $template = (string) $template;
  
          $loader = $this->twig->getLoader();
          if ($loader instanceof ExistsLoaderInterface || method_exists($loader, 'exists')) {
              return $loader->exists($template);
          }
  
          try {
              $loader->getSourceContext($template)->getCode();
  
              return true;
          } catch (LoaderError $e) {
          }
  
          return false;
      }
code: protected function templateExists($template)
      {
          $template = (string) $template;
  
          $loader = $this->twig->getLoader();
          if ($loader instanceof ExistsLoaderInterface || method_exists($loader, 'exists')) {
              return $loader->exists($template);
          }
  
          try {
              $loader->getSourceContext($template)->getCode();
  
              return true;
          } catch (LoaderError $e) {
          }
  
          return false;
      }
code_tokens: protected function templateExists ( $ template ) { $ template = ( string ) $ template ; $ loader = $ this -> twig -> getLoader ( ) ; if ( $ loader instanceof ExistsLoaderInterface || method_exists ( $ loader , 'exists' ) ) { return $ loader -> exists ( $ template ) ; } try { $ loader -> getSourceContext ( $ template ) -> getCode ( ) ; return true ; } catch ( LoaderError $ e ) { } return false ; }
docstring: to be removed when the minimum required version of Twig is >= 3.0
docstring_tokens: to be removed when the minimum required version of Twig is > = 3 . 0