code: private function detectIndent(Tokens $tokens, $index)
      {
          if (!$tokens[$index - 1]->isWhitespace()) {
              return ''; // cannot detect indent
          }
  
          $explodedContent = explode("\n", $tokens[$index - 1]->getContent());
  
          return end($explodedContent);
      }
docs: @param Tokens $tokens
  @param int    $index
  
  @return string