original_string: public function listExtensions($type)
      {
          $results = [];
  
          if ($this->items === null) {
              $this->loadExtensions();
          }
  
          if (isset($this->items[$type]) && is_array($this->items[$type])) {
              $results = $this->items[$type];
          }
  
          if ($this->transactionItems !== null && isset($this->transactionItems[$type])) {
              $results = array_merge($results, $this->transactionItems[$type]);
          }
  
          return $results;
      }
code: public function listExtensions($type)
      {
          $results = [];
  
          if ($this->items === null) {
              $this->loadExtensions();
          }
  
          if (isset($this->items[$type]) && is_array($this->items[$type])) {
              $results = $this->items[$type];
          }
  
          if ($this->transactionItems !== null && isset($this->transactionItems[$type])) {
              $results = array_merge($results, $this->transactionItems[$type]);
          }
  
          return $results;
      }
code_tokens: public function listExtensions ( $ type ) { $ results = [ ] ; if ( $ this -> items === null ) { $ this -> loadExtensions ( ) ; } if ( isset ( $ this -> items [ $ type ] ) && is_array ( $ this -> items [ $ type ] ) ) { $ results = $ this -> items [ $ type ] ; } if ( $ this -> transactionItems !== null && isset ( $ this -> transactionItems [ $ type ] ) ) { $ results = array_merge ( $ results , $ this -> transactionItems [ $ type ] ) ; } return $ results ; }
docstring: Returns a list of the registered Twig extensions of a type.
  @param $type string The Twig extension type
  @return array
docstring_tokens: Returns a list of the registered Twig extensions of a type .