code: private function fixStructureOpenCloseIfMultiLine($index)
      {
          $blockTypeInfo = Tokens::detectBlockType($this->tokens[$index]);
          $bodyEnd = $this->tokens->findBlockEnd($blockTypeInfo['type'], $index);
  
          for ($i = $bodyEnd - 1; $i >= $index; --$i) {
              if (false !== strpos($this->tokens[$i]->getContent(), "\n")) {
                  $this->removeEmptyLinesAfterLineWithTokenAt($i);
                  $this->removeEmptyLinesAfterLineWithTokenAt($index);
  
                  break;
              }
          }
      }
docs: Remove white line(s) after the index of a block type,
  but only if the block is not on one line.
  
  @param int $index body start