Changeset 2963 for trunk/vendor
- Timestamp:
- 10/21/07 07:23:59 (15 months ago)
- Location:
- trunk/vendor
- Files:
-
- 43 modified
-
PEAR.php (modified) (7 diffs)
-
Sensei/Sensei.php (modified) (4 diffs)
-
Sensei/Sensei/Doc/Renderer/Pdf.php (modified) (1 diff)
-
Sensei/Sensei/Doc/Renderer/Xhtml.php (modified) (3 diffs)
-
Sensei/Sensei/Doc/Section.php (modified) (22 diffs)
-
Sensei/Sensei/Doc/Toc.php (modified) (3 diffs)
-
spikephpcoverage/cli/driver.php (modified) (5 diffs)
-
spikephpcoverage/cli/instrument.php (modified) (10 diffs)
-
spikephpcoverage/CoverageRecorder.php (modified) (4 diffs)
-
spikephpcoverage/parser/BasicXmlParser.php (modified) (1 diff)
-
spikephpcoverage/parser/CoverageXmlParser.php (modified) (2 diffs)
-
spikephpcoverage/parser/Parser.php (modified) (3 diffs)
-
spikephpcoverage/parser/PHPParser.php (modified) (2 diffs)
-
spikephpcoverage/PEAR.php (modified) (4 diffs)
-
spikephpcoverage/phpcoverage.inc.php (modified) (1 diff)
-
spikephpcoverage/phpcoverage.remote.bottom.inc.php (modified) (2 diffs)
-
spikephpcoverage/phpcoverage.remote.top.inc.php (modified) (3 diffs)
-
spikephpcoverage/remote/RemoteCoverageRecorder.php (modified) (7 diffs)
-
spikephpcoverage/remote/XdebugTraceReader.php (modified) (3 diffs)
-
spikephpcoverage/reporter/CoverageReporter.php (modified) (3 diffs)
-
spikephpcoverage/reporter/HtmlCoverageReporter.php (modified) (6 diffs)
-
spikephpcoverage/util/CoverageLogger.php (modified) (1 diff)
-
spikephpcoverage/util/Utility.php (modified) (3 diffs)
-
spikephpcoverage/XML/Parser.php (modified) (7 diffs)
-
spikephpcoverage/XML/Parser/Simple.php (modified) (2 diffs)
-
Text/Wiki.php (modified) (21 diffs)
-
Text/Wiki/Parse/Default/Center.php (modified) (1 diff)
-
Text/Wiki/Parse/Default/Code.php (modified) (2 diffs)
-
Text/Wiki/Parse/Default/Freelink.php (modified) (1 diff)
-
Text/Wiki/Parse/Default/Heading.php (modified) (2 diffs)
-
Text/Wiki/Parse/Default/Image.php (modified) (1 diff)
-
Text/Wiki/Parse/Default/List.php (modified) (2 diffs)
-
Text/Wiki/Parse/Default/Wikilink.php (modified) (1 diff)
-
Text/Wiki/Render/Latex/Blockquote.php (modified) (1 diff)
-
Text/Wiki/Render/Latex/Colortext.php (modified) (1 diff)
-
Text/Wiki/Render/Latex/Font.php (modified) (1 diff)
-
Text/Wiki/Render/Latex/Image.php (modified) (1 diff)
-
Text/Wiki/Render/Latex/Phplookup.php (modified) (1 diff)
-
Text/Wiki/Render/Plain/Phplookup.php (modified) (1 diff)
-
Text/Wiki/Render/Xhtml/Colortext.php (modified) (1 diff)
-
Text/Wiki/Render/Xhtml/Image.php (modified) (3 diffs)
-
Text/Wiki/Render/Xhtml/Url.php (modified) (1 diff)
-
Text/Wiki/Render/Xhtml/Wikilink.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/vendor/PEAR.php
r1127 r2963 54 54 55 55 // instant backwards compatibility 56 if ( !defined('PATH_SEPARATOR')) {56 if ( ! defined('PATH_SEPARATOR')) { 57 57 if (OS_WINDOWS) { 58 58 define('PATH_SEPARATOR', ';'); … … 182 182 global $_PEAR_destructor_object_list; 183 183 $_PEAR_destructor_object_list[] = &$this; 184 if ( !isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) {184 if ( ! isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) { 185 185 register_shutdown_function("_PEAR_call_destructors"); 186 186 $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true; … … 231 231 { 232 232 static $properties; 233 if ( !isset($properties[$class])) {233 if ( ! isset($properties[$class])) { 234 234 $properties[$class] = array(); 235 235 } 236 if ( !array_key_exists($var, $properties[$class])) {236 if ( ! array_key_exists($var, $properties[$class])) { 237 237 $properties[$class][$var] = null; 238 238 } … … 256 256 // if we are called statically, there is a potential 257 257 // that no shutdown func is registered. Bug #6445 258 if ( !isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) {258 if ( ! isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) { 259 259 register_shutdown_function("_PEAR_call_destructors"); 260 260 $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true; … … 469 469 } 470 470 return $deleted ? true : PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME 471 } elseif ( !empty($error_code)) {471 } elseif ( ! empty($error_code)) { 472 472 // $error_code comes alone, trying to unset it 473 473 if ($this->_checkDelExpect($error_code)) { … … 741 741 function loadExtension($ext) 742 742 { 743 if ( !extension_loaded($ext)) {743 if ( ! extension_loaded($ext)) { 744 744 // if either returns true dl() will produce a FATAL error, stop that 745 745 if ((ini_get('enable_dl') != 1) || (ini_get('safe_mode') == 1)) { … … 865 865 $this->mode = $mode; 866 866 $this->userinfo = $userinfo; 867 if ( !PEAR::getStaticProperty('PEAR_Error', 'skiptrace')) {867 if ( ! PEAR::getStaticProperty('PEAR_Error', 'skiptrace')) { 868 868 $this->backtrace = debug_backtrace(); 869 869 if (isset($this->backtrace[0]) && isset($this->backtrace[0]['object'])) { -
trunk/vendor/Sensei/Sensei.php
r1651 r2963 37 37 */ 38 38 private static $path; 39 39 40 /** 40 41 * getPath … … 45 46 public static function getPath() 46 47 { 47 if ( !self::$path) {48 if ( ! self::$path) { 48 49 self::$path = dirname(__FILE__); 49 50 } 50 51 return self::$path; 51 52 } 53 52 54 /** 53 55 * simple autoload function … … 92 94 return false; 93 95 } 94 if ( !self::$path) {96 if ( ! self::$path) { 95 97 self::$path = dirname(__FILE__); 96 98 } … … 106 108 . 'be loaded.'); 107 109 } 110 108 111 /** 109 112 * Create a new instance of a class. -
trunk/vendor/Sensei/Sensei/Doc/Renderer/Pdf.php
r2320 r2963 59 59 } 60 60 } 61 61 62 62 /** 63 63 * Deletes temporary files generated during LaTeX to PDF conversion. -
trunk/vendor/Sensei/Sensei/Doc/Renderer/Xhtml.php
r2622 r2963 53 53 $this->_wiki->setRenderConf('xhtml', 'Doclink', 'url_callback', array(&$this, 'makeUrl')); 54 54 } 55 55 56 56 /** 57 57 * Renders table of contents as nested unordered lists. … … 104 104 return $output; 105 105 } 106 106 107 107 /** 108 108 * Renders section defined by 'section' option. If 'section' option is not … … 139 139 return $output; 140 140 } 141 141 142 142 /** 143 143 * Renders a sections and its children -
trunk/vendor/Sensei/Sensei/Doc/Section.php
r2624 r2963 40 40 */ 41 41 private $_name; 42 42 43 43 /** 44 44 * The index of this section among the subsections of its parent. The index … … 48 48 */ 49 49 private $_index; 50 50 51 51 /** 52 52 * Array containing the subsections of this section. … … 55 55 */ 56 56 private $_children = array(); 57 57 58 58 /** 59 59 * The parent of this section. … … 62 62 */ 63 63 private $_parent; 64 64 65 65 /** 66 66 * Level of this section in section hierarchy. … … 69 69 */ 70 70 private $_level = 0; 71 71 72 72 /** 73 73 * Text contents of this section. … … 94 94 } 95 95 } 96 96 97 97 /** 98 98 * Adds a subsection to this section. … … 105 105 $this->_children[] = $child; 106 106 } 107 107 108 108 /** 109 109 * Returns the index of this section. … … 120 120 } 121 121 } 122 122 123 123 /** 124 124 * Returns the path of this section. … … 135 135 } 136 136 } 137 137 138 138 /** 139 139 * Returns the name of this section. … … 151 151 } 152 152 } 153 153 154 154 /** 155 155 * Returns how many subsections this section has. … … 161 161 return count($this->_children); 162 162 } 163 163 164 164 /** 165 165 * Returns the subsection that has the given index. … … 175 175 return $this->_children[$index]; 176 176 } 177 177 178 178 /** 179 179 * Returns the parent of this section. … … 189 189 } 190 190 } 191 191 192 192 /** 193 193 * Returns the next section. … … 218 218 } else { 219 219 220 if (( !$maxLevel || ($this->_level < $maxLevel))220 if (( ! $maxLevel || ($this->_level < $maxLevel)) 221 221 && (count($this) > 0)) { 222 222 return $this->getChild(0); 223 223 } 224 224 225 if (( !$maxLevel || ($this->_level <= $maxLevel) )225 if (( ! $maxLevel || ($this->_level <= $maxLevel) ) 226 226 && ($this->_index < count($this->_parent) - 1)) { 227 227 return $this->_parent->getChild($this->_index + 1); … … 232 232 } 233 233 } 234 234 235 235 /** 236 236 * Returns the previous section. … … 255 255 } 256 256 } 257 257 258 258 /** 259 259 * Finds the last child or grand child of this section. … … 268 268 public function findLastChild($maxLevel = 0) 269 269 { 270 if (( !$maxLevel || $this->_level < $maxLevel) && count($this) > 0) {270 if (( ! $maxLevel || $this->_level < $maxLevel) && count($this) > 0) { 271 271 return $this->getChild(count($this) - 1)->findLastChild(); 272 272 } else { … … 274 274 } 275 275 } 276 276 277 277 /** 278 278 * Returns true, if this section is the root section. … … 284 284 return $this->_parent === null; 285 285 } 286 286 287 287 /** 288 288 * Returns the level of this section in section hierarchy. … … 294 294 return $this->_level; 295 295 } 296 296 297 297 /** 298 298 * Returns the text contents of this section. … … 326 326 // The current section did not have any text in this file. 327 327 // Let's assume that the text is defined in another file. 328 if ( !$current->isRoot() && $current->_text === '') {328 if ( ! $current->isRoot() && $current->_text === '') { 329 329 330 330 $otherFilename = $current->getPath(false, DIRECTORY_SEPARATOR) . '.txt'; … … 371 371 // The last section did not have any text in this file. 372 372 // Let's assume that the text is defined in another file. 373 if ( !$current->isRoot() && $current->_text === '') {373 if ( ! $current->isRoot() && $current->_text === '') { 374 374 375 375 $otherFilename = $current->getPath(false, DIRECTORY_SEPARATOR) . '.txt'; -
trunk/vendor/Sensei/Sensei/Doc/Toc.php
r1651 r2963 53 53 $this->_toc->parse(dirname($filename), basename($filename)); 54 54 } 55 55 56 56 /** 57 57 * Finds the section that matches the given path. … … 109 109 return $currentSection; 110 110 } 111 111 112 112 /** 113 113 * Returns a root section with the given index. … … 120 120 return $this->_toc->getChild($index); 121 121 } 122 122 123 123 /** 124 124 * Returns the number of sections (excluding their subsections). -
trunk/vendor/spikephpcoverage/cli/driver.php
r2847 r2963 19 19 */ 20 20 21 if( !defined("__PHPCOVERAGE_HOME")) {21 if( ! defined("__PHPCOVERAGE_HOME")) { 22 22 define("__PHPCOVERAGE_HOME", dirname(dirname(__FILE__))); 23 23 } … … 149 149 $excludePaths = array(); 150 150 151 if ( !$OPTION['cov-url']){152 if( !$OPTION['report'] && !$OPTION['cov-data-files']) {151 if ( ! $OPTION['cov-url']){ 152 if( ! $OPTION['report'] && !$OPTION['cov-data-files']) { 153 153 echo "ERROR: No --cov-url option specified.\n"; 154 154 exit(1); … … 157 157 158 158 if($OPTION['init']) { 159 if( !$OPTION['tmp-dir']) {159 if( ! $OPTION['tmp-dir']) { 160 160 $OPTION['tmp-dir'] = $util->getTmpDir(); 161 161 } 162 if( !$OPTION['cov-file-name']) {162 if( ! $OPTION['cov-file-name']) { 163 163 $OPTION['cov-file-name'] = "phpcoverage.data.xml"; 164 164 } … … 166 166 167 167 if($OPTION['report']) { 168 if ( !$OPTION['report-name']){168 if ( ! $OPTION['report-name']){ 169 169 echo "ERROR: No --report-name option specified.\n"; 170 170 exit(1); 171 171 } 172 172 173 if( !$OPTION['report-dir']) {174 if( !empty($PHPCOVERAGE_REPORT_DIR)) {173 if( ! $OPTION['report-dir']) { 174 if( ! empty($PHPCOVERAGE_REPORT_DIR)) { 175 175 $OPTION["report-dir"] = $PHPCOVERAGE_REPORT_DIR; 176 176 } … … 226 226 $OPTION['cov-data-fileset'] = explode(",", $OPTION['cov-data-files']); 227 227 foreach($OPTION['cov-data-fileset'] as $covDataFile) { 228 if( !is_readable($covDataFile)) {228 if( ! is_readable($covDataFile)) { 229 229 echo "Error: Cannot read cov-data-file: " . $covDataFile . "\n"; 230 230 exit(1); -
trunk/vendor/spikephpcoverage/cli/instrument.php
r2847 r2963 11 11 #!/bin/php 12 12 13 if( !defined("__PHPCOVERAGE_HOME")) {13 if( ! defined("__PHPCOVERAGE_HOME")) { 14 14 define("__PHPCOVERAGE_HOME", dirname(dirname(__FILE__))); 15 15 } … … 82 82 83 83 $fp = fopen($tmpfile, "w"); 84 if( !$fp) {84 if( ! $fp) { 85 85 error("Cannot write to file: $tmpfile"); 86 86 } … … 94 94 } 95 95 $ret = rename($tmpfile, $file); 96 if( !$ret) {96 if( ! $ret) { 97 97 error("Cannot save file: $file"); 98 98 } … … 119 119 $fr = fopen($file, "r"); 120 120 $fw = fopen($tmpfile, "w"); 121 if( !$fr) {121 if( ! $fr) { 122 122 error("Cannot read file: $file"); 123 123 } 124 if( !$fr) {124 if( ! $fr) { 125 125 error("Cannot write to file: $tmpfile"); 126 126 } 127 while( !feof($fr)) {127 while( ! feof($fr)) { 128 128 $line = fgets($fr); 129 129 if(strpos($line, $top) === false && strpos($line, $bottom) === false) { … … 139 139 } 140 140 $ret = rename($tmpfile, $file); 141 if( !$ret) {141 if( ! $ret) { 142 142 error("Cannot save file: $file"); 143 143 } … … 159 159 while(count($dirs) > 0) { 160 160 $currDir = realpath(array_pop($dirs)); 161 if( !is_readable($currDir)) {161 if( ! is_readable($currDir)) { 162 162 continue; 163 163 } … … 237 237 238 238 239 if( !is_dir($LOCAL_PHPCOVERAGE_LOCATION)) {239 if( ! is_dir($LOCAL_PHPCOVERAGE_LOCATION)) { 240 240 error("LOCAL_PHPCOVERAGE_LOCATION [$LOCAL_PHPCOVERAGE_LOCATION] not found."); 241 241 } … … 252 252 } 253 253 $ret = copy($PHPCOVERAGE_HOME . $top_file, $LOCAL_PHPCOVERAGE_LOCATION . $top_file); 254 if( !$ret) {254 if( ! $ret) { 255 255 error("Cannot copy to $LOCAL_PHPCOVERAGE_LOCATION"); 256 256 } … … 259 259 } 260 260 $ret = copy($PHPCOVERAGE_HOME . $bottom_file, $LOCAL_PHPCOVERAGE_LOCATION . $bottom_file); 261 if( !$ret) {261 if( ! $ret) { 262 262 error("Cannot copy to $LOCAL_PHPCOVERAGE_LOCATION"); 263 263 } … … 268 268 $paths[] = getcwd(); 269 269 } 270 if( !isset($EXCLUDE_FILES) || empty($EXCLUDE_FILES)) {270 if( ! isset($EXCLUDE_FILES) || empty($EXCLUDE_FILES)) { 271 271 $EXCLUDE_FILES = array(); 272 272 } 273 273 for($i = 0; $i < count($EXCLUDE_FILES); $i++) { 274 274 // Remove a file from the array if it does not exist 275 if( !file_exists($EXCLUDE_FILES[$i])) {275 if( ! file_exists($EXCLUDE_FILES[$i])) { 276 276 array_splice($EXCLUDE_FILES, $i, 1); 277 277 $i --; -
trunk/vendor/spikephpcoverage/CoverageRecorder.php
r2847 r2963 10 10 <?php 11 11 12 if( !defined("__PHPCOVERAGE_HOME")) {12 if( ! defined("__PHPCOVERAGE_HOME")) { 13 13 define("__PHPCOVERAGE_HOME", dirname(__FILE__)); 14 14 } … … 169 169 protected function removeAbsentPaths(&$dirs) { 170 170 for($i = 0; $i < count($dirs); $i++) { 171 if( !file_exists($dirs[$i])) {171 if( ! file_exists($dirs[$i])) { 172 172 // echo "Not found: " . $dirs[$i] . "\n"; 173 173 $this->errors[] = "Not found: " . $dirs[$i] … … 212 212 while(count($dirs) > 0) { 213 213 $currDir = realpath(array_pop($dirs)); 214 if( !is_readable($currDir)) {214 if( ! is_readable($currDir)) { 215 215 continue; 216 216 } … … 272 272 } 273 273 } 274 if( !array_key_exists($files[$i], $this->coverageData)) {274 if( ! array_key_exists($files[$i], $this->coverageData)) { 275 275 $this->coverageData[$files[$i]] = array(); 276 276 } -
trunk/vendor/spikephpcoverage/parser/BasicXmlParser.php