original_string: public function getTocs()
      {
          $tocs = array();
  
          $nodes = $this->getNodes(function($node) {
              return $node instanceof TocNode;
          });
  
          foreach ($nodes as $toc) {
              $files = $toc->getFiles();
  
              foreach ($files as &$file) {
                  $file = $this->environment->canonicalUrl($file);
              }
  
              $tocs[] = $files;
          }
  
          return $tocs;
      }
code: public function getTocs()
      {
          $tocs = array();
  
          $nodes = $this->getNodes(function($node) {
              return $node instanceof TocNode;
          });
  
          foreach ($nodes as $toc) {
              $files = $toc->getFiles();
  
              foreach ($files as &$file) {
                  $file = $this->environment->canonicalUrl($file);
              }
  
              $tocs[] = $files;
          }
  
          return $tocs;
      }
code_tokens: public function getTocs ( ) { $ tocs = array ( ) ; $ nodes = $ this -> getNodes ( function ( $ node ) { return $ node instanceof TocNode ; } ) ; foreach ( $ nodes as $ toc ) { $ files = $ toc -> getFiles ( ) ; foreach ( $ files as & $ file ) { $ file = $ this -> environment -> canonicalUrl ( $ file ) ; } $ tocs [ ] = $ files ; } return $ tocs ; }
docstring: Get the table of contents of the document
docstring_tokens: Get the table of contents of the document