original_string: public function openSection($id = null)
      {
          $current = end($this->activeSections);
  
          if (null !== $id && null === $current->get($id)) {
              throw new \LogicException(sprintf('The section "%s" has been started at an other level and can not be opened.', $id));
          }
  
          $this->start('__section__.child', 'section');
          $this->activeSections[] = $current->open($id);
          $this->start('__section__');
      }
code: public function openSection($id = null)
      {
          $current = end($this->activeSections);
  
          if (null !== $id && null === $current->get($id)) {
              throw new \LogicException(sprintf('The section "%s" has been started at an other level and can not be opened.', $id));
          }
  
          $this->start('__section__.child', 'section');
          $this->activeSections[] = $current->open($id);
          $this->start('__section__');
      }
code_tokens: public function openSection ( $ id = null ) { $ current = end ( $ this -> activeSections ) ; if ( null !== $ id && null === $ current -> get ( $ id ) ) { throw new \ LogicException ( sprintf ( 'The section "%s" has been started at an other level and can not be opened.' , $ id ) ) ; } $ this -> start ( '__section__.child' , 'section' ) ; $ this -> activeSections [ ] = $ current -> open ( $ id ) ; $ this -> start ( '__section__' ) ; }
docstring: Creates a new section or re-opens an existing section.
  
  @param string|null $id The id of the session to re-open, null to create a new one
  
  @throws \LogicException When the section to re-open is not reachable
docstring_tokens: Creates a new section or re - opens an existing section .