original_string: public function clear(int $lines = null)
      {
          if (empty($this->content) || !$this->isDecorated()) {
              return;
          }
  
          if ($lines) {
              \array_splice($this->content, -($lines * 2)); // Multiply lines by 2 to cater for each new line added between content
          } else {
              $lines = $this->lines;
              $this->content = [];
          }
  
          $this->lines -= $lines;
  
          parent::doWrite($this->popStreamContentUntilCurrentSection($lines), false);
      }
code: public function clear(int $lines = null)
      {
          if (empty($this->content) || !$this->isDecorated()) {
              return;
          }
  
          if ($lines) {
              \array_splice($this->content, -($lines * 2)); // Multiply lines by 2 to cater for each new line added between content
          } else {
              $lines = $this->lines;
              $this->content = [];
          }
  
          $this->lines -= $lines;
  
          parent::doWrite($this->popStreamContentUntilCurrentSection($lines), false);
      }
code_tokens: public function clear ( int $ lines = null ) { if ( empty ( $ this -> content ) || ! $ this -> isDecorated ( ) ) { return ; } if ( $ lines ) { \ array_splice ( $ this -> content , - ( $ lines * 2 ) ) ; // Multiply lines by 2 to cater for each new line added between content } else { $ lines = $ this -> lines ; $ this -> content = [ ] ; } $ this -> lines -= $ lines ; parent :: doWrite ( $ this -> popStreamContentUntilCurrentSection ( $ lines ) , false ) ; }
docstring: Clears previous output for this section.
  
  @param int $lines Number of lines to clear. If null, then the entire output of this section is cleared
docstring_tokens: Clears previous output for this section .