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