original_string: public function pop(OutputFormatterStyleInterface $style = null)
      {
          if (empty($this->styles)) {
              return $this->emptyStyle;
          }
  
          if (null === $style) {
              return array_pop($this->styles);
          }
  
          foreach (array_reverse($this->styles, true) as $index => $stackedStyle) {
              if ($style->apply('') === $stackedStyle->apply('')) {
                  $this->styles = \array_slice($this->styles, 0, $index);
  
                  return $stackedStyle;
              }
          }
  
          throw new InvalidArgumentException('Incorrectly nested style tag found.');
      }
code: public function pop(OutputFormatterStyleInterface $style = null)
      {
          if (empty($this->styles)) {
              return $this->emptyStyle;
          }
  
          if (null === $style) {
              return array_pop($this->styles);
          }
  
          foreach (array_reverse($this->styles, true) as $index => $stackedStyle) {
              if ($style->apply('') === $stackedStyle->apply('')) {
                  $this->styles = \array_slice($this->styles, 0, $index);
  
                  return $stackedStyle;
              }
          }
  
          throw new InvalidArgumentException('Incorrectly nested style tag found.');
      }
code_tokens: public function pop ( OutputFormatterStyleInterface $ style = null ) { if ( empty ( $ this -> styles ) ) { return $ this -> emptyStyle ; } if ( null === $ style ) { return array_pop ( $ this -> styles ) ; } foreach ( array_reverse ( $ this -> styles , true ) as $ index => $ stackedStyle ) { if ( $ style -> apply ( '' ) === $ stackedStyle -> apply ( '' ) ) { $ this -> styles = \ array_slice ( $ this -> styles , 0 , $ index ) ; return $ stackedStyle ; } } throw new InvalidArgumentException ( 'Incorrectly nested style tag found.' ) ; }
docstring: Pops a style from the stack.
  
  @return OutputFormatterStyleInterface
  
  @throws InvalidArgumentException When style tags incorrectly nested
docstring_tokens: Pops a style from the stack .