svn: /pear/peardoc/trunk/scripts/ pearwebpackagetocs.php

[email protected] (Christian Weiske) Tue, 01 Mar 2011 08:09:06 +0000
Newsgroups php.pear.doc
Message-ID <[email protected]>
cweiske                                  Tue, 01 Mar 2011 08:09:06 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=308803

Log:
delete whitespace

Changed paths:
    U   pear/peardoc/trunk/scripts/pearwebpackagetocs.php

Modified: pear/peardoc/trunk/scripts/pearwebpackagetocs.php
===================================================================
--- pear/peardoc/trunk/scripts/pearwebpackagetocs.php	2011-03-01 07:37:58 UTC (rev 308802)
+++ pear/peardoc/trunk/scripts/pearwebpackagetocs.php	2011-03-01 08:09:06 UTC (rev 308803)
@@ -47,7 +47,7 @@
                 'version'     => '$Id$'
             )
         );
-
+
         $parser->addOption('toc_depth', array(
             'short_name'  => '-d',
             'long_name'   => '--toc-depth',
@@ -134,13 +134,13 @@
         if (!is_writable($outputDir)) {
             throw new Exception('Output directory is not writable', -2);
         }
-
+
         if (substr($outputDir, -1) !== '/') {
             $outputDir .= '/';
         }

         $this->opts['verbose'] && printf("Output dir: %s\n", $outputDir);
-
+
         return $outputDir;
     }

@@ -156,7 +156,7 @@
     protected function getIndexFile()
     {
         $indexFile = $this->opts['index_file'];
-
+
         if (!file_exists($indexFile)) {
             throw new Exception(
                 'Index file does not exist: ' . $indexFile . "\n"
@@ -168,11 +168,11 @@
                 'Index file is not readable: ' . $indexFile, -12
             );
         }
-
+
         if ($this->opts['verbose']) {
             printf("Index file: %s\n", $indexFile);
         }
-
+
         return $indexFile;
     }

@@ -189,7 +189,7 @@
                 && printf("No children for %s\n", $arPackage['docbook_id']);
             return '';
         }
-
+
         $sp = str_repeat(' ', $depth * 2);
         $content = '';
         $depth > 0 && $content .= "\n";
@@ -210,10 +210,10 @@
             if ($depth < $this->opts['toc_depth'] - 1) {
                 $content .= $this->createPearwebPackageToc($arChunk, $slite, $depth + 1);
             }
-
+
             $content .= "</li>\n";;
         } while ($arChunk = $sqlres->fetchArray(SQLITE3_ASSOC));
-
+
         $content .= $sp . "</ul>\n";
         $depth > 0 && $content .= str_repeat(' ', $depth * 2 - 1);

@@ -233,7 +233,7 @@
     protected function createPackageTocs($indexFile, $outputDir)
     {
         $slite = new SQLite3($indexFile, SQLITE3_OPEN_READONLY);
-
+
         $sqlres = $slite->query(
             'SELECT packages.* FROM ids AS packages, ids AS categories'
             . ' WHERE categories.parent_id = "packages"'
@@ -241,7 +241,7 @@
             . ' ORDER BY packages.docbook_id'
         );
         $nCount = 0;
-
+
         while ($arPackage = $sqlres->fetchArray(SQLITE3_ASSOC)) {
             $strToc = $this->createPearwebPackageToc($arPackage, $slite);
             if ($strToc) {
@@ -258,7 +258,7 @@
                 $this->opts['progress'] && print('n');
             }
         }
-
+
         $this->opts['progress'] && print("\n");
         return $nCount;
     }