original_string: protected function writeGoogleDriveFolderData(
          OutputInterface $output,
          \Google_Service_Drive $drive,
          \Google_Service_Drive_DriveFile $folder
      ) {
          $output->writeln('<info>The URL is a Google Drive folder</info>');
          $output->writeln('Name: '.$folder->getName());
          $output->writeln('Content:');
  
          $pageToken = null;
  
          do {
              $children = $drive->files->listFiles([
                  'pageSize' => 1000,
                  'pageToken' => $pageToken,
                  'q' => "'{$folder->getId()}' in parents",
                  'fields' => 'nextPageToken, files(id,name,mimeType)'
              ]);
  
              foreach ($children as $child) {
                  /** @var \Google_Service_Drive_DriveFile $child */
                  $output->writeln(
                      ' - A '.($child->getMimeType() === GoogleAPIClient::MIME_TYPE_DRIVE_FOLDER ? 'folder' : 'file')
                      .'. Name: '.$child->getName()
                  );
              }
  
              $pageToken = $children->getNextPageToken();
          } while ($pageToken);
      }
code: protected function writeGoogleDriveFolderData(
          OutputInterface $output,
          \Google_Service_Drive $drive,
          \Google_Service_Drive_DriveFile $folder
      ) {
          $output->writeln('<info>The URL is a Google Drive folder</info>');
          $output->writeln('Name: '.$folder->getName());
          $output->writeln('Content:');
  
          $pageToken = null;
  
          do {
              $children = $drive->files->listFiles([
                  'pageSize' => 1000,
                  'pageToken' => $pageToken,
                  'q' => "'{$folder->getId()}' in parents",
                  'fields' => 'nextPageToken, files(id,name,mimeType)'
              ]);
  
              foreach ($children as $child) {
                  /** @var \Google_Service_Drive_DriveFile $child */
                  $output->writeln(
                      ' - A '.($child->getMimeType() === GoogleAPIClient::MIME_TYPE_DRIVE_FOLDER ? 'folder' : 'file')
                      .'. Name: '.$child->getName()
                  );
              }
  
              $pageToken = $children->getNextPageToken();
          } while ($pageToken);
      }
code_tokens: protected function writeGoogleDriveFolderData ( OutputInterface $ output , \ Google_Service_Drive $ drive , \ Google_Service_Drive_DriveFile $ folder ) { $ output -> writeln ( '<info>The URL is a Google Drive folder</info>' ) ; $ output -> writeln ( 'Name: ' . $ folder -> getName ( ) ) ; $ output -> writeln ( 'Content:' ) ; $ pageToken = null ; do { $ children = $ drive -> files -> listFiles ( [ 'pageSize' => 1000 , 'pageToken' => $ pageToken , 'q' => "'{$folder->getId()}' in parents" , 'fields' => 'nextPageToken, files(id,name,mimeType)' ] ) ; foreach ( $ children as $ child ) { /** @var \Google_Service_Drive_DriveFile $child */ $ output -> writeln ( ' - A ' . ( $ child -> getMimeType ( ) === GoogleAPIClient :: MIME_TYPE_DRIVE_FOLDER ? 'folder' : 'file' ) . '. Name: ' . $ child -> getName ( ) ) ; } $ pageToken = $ children -> getNextPageToken ( ) ; } while ( $ pageToken ) ; }
docstring: Prints a URL ping result as if the result is a Google Drive folder
  
  @param OutputInterface $output
  @param \Google_Service_Drive $drive The Drive API service
  @param \Google_Service_Drive_DriveFile $folder The folder
  @link https://stackoverflow.com/a/42055925/1118709
docstring_tokens: Prints a URL ping result as if the result is a Google Drive folder