Changeset 2963 for trunk/vendor

Show
Ignore:
Timestamp:
10/21/07 07:23:59 (15 months ago)
Author:
jwage
Message:

Mass search and replace for coding standards changes, doc block formatting, and code spacing.

Location:
trunk/vendor
Files:
43 modified

Legend:

Unmodified
Added
Removed
  • trunk/vendor/PEAR.php

    r1127 r2963  
    5454 
    5555// instant backwards compatibility 
    56 if (!defined('PATH_SEPARATOR')) { 
     56if ( ! defined('PATH_SEPARATOR')) { 
    5757    if (OS_WINDOWS) { 
    5858        define('PATH_SEPARATOR', ';'); 
     
    182182                global $_PEAR_destructor_object_list; 
    183183                $_PEAR_destructor_object_list[] = &$this; 
    184                 if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) { 
     184                if ( ! isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) { 
    185185                    register_shutdown_function("_PEAR_call_destructors"); 
    186186                    $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true; 
     
    231231    { 
    232232        static $properties; 
    233         if (!isset($properties[$class])) { 
     233        if ( ! isset($properties[$class])) { 
    234234            $properties[$class] = array(); 
    235235        } 
    236         if (!array_key_exists($var, $properties[$class])) { 
     236        if ( ! array_key_exists($var, $properties[$class])) { 
    237237            $properties[$class][$var] = null; 
    238238        } 
     
    256256        // if we are called statically, there is a potential 
    257257        // that no shutdown func is registered.  Bug #6445 
    258         if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) { 
     258        if ( ! isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) { 
    259259            register_shutdown_function("_PEAR_call_destructors"); 
    260260            $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true; 
     
    469469            } 
    470470            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)) { 
    472472            // $error_code comes alone, trying to unset it 
    473473            if ($this->_checkDelExpect($error_code)) { 
     
    741741    function loadExtension($ext) 
    742742    { 
    743         if (!extension_loaded($ext)) { 
     743        if ( ! extension_loaded($ext)) { 
    744744            // if either returns true dl() will produce a FATAL error, stop that 
    745745            if ((ini_get('enable_dl') != 1) || (ini_get('safe_mode') == 1)) { 
     
    865865        $this->mode      = $mode; 
    866866        $this->userinfo  = $userinfo; 
    867         if (!PEAR::getStaticProperty('PEAR_Error', 'skiptrace')) { 
     867        if ( ! PEAR::getStaticProperty('PEAR_Error', 'skiptrace')) { 
    868868            $this->backtrace = debug_backtrace(); 
    869869            if (isset($this->backtrace[0]) && isset($this->backtrace[0]['object'])) { 
  • trunk/vendor/Sensei/Sensei.php

    r1651 r2963  
    3737     */ 
    3838    private static $path; 
     39 
    3940    /** 
    4041     * getPath 
     
    4546    public static function getPath() 
    4647    { 
    47         if (! self::$path) { 
     48        if ( ! self::$path) { 
    4849            self::$path = dirname(__FILE__); 
    4950        } 
    5051        return self::$path; 
    5152    } 
     53 
    5254    /** 
    5355     * simple autoload function 
     
    9294            return false; 
    9395        } 
    94         if (! self::$path) { 
     96        if ( ! self::$path) { 
    9597            self::$path = dirname(__FILE__); 
    9698        } 
     
    106108                                 . 'be loaded.'); 
    107109    } 
     110 
    108111    /** 
    109112     * Create a new instance of a class. 
  • trunk/vendor/Sensei/Sensei/Doc/Renderer/Pdf.php

    r2320 r2963  
    5959        } 
    6060    } 
    61      
     61 
    6262    /** 
    6363     * Deletes temporary files generated during LaTeX to PDF conversion. 
  • trunk/vendor/Sensei/Sensei/Doc/Renderer/Xhtml.php

    r2622 r2963  
    5353        $this->_wiki->setRenderConf('xhtml', 'Doclink', 'url_callback', array(&$this, 'makeUrl')); 
    5454    } 
    55      
     55 
    5656    /** 
    5757     * Renders table of contents as nested unordered lists. 
     
    104104        return $output; 
    105105    } 
    106      
     106 
    107107    /** 
    108108     * Renders section defined by 'section' option. If 'section' option is not 
     
    139139        return $output; 
    140140    } 
    141      
     141 
    142142    /** 
    143143     * Renders a sections and its children 
  • trunk/vendor/Sensei/Sensei/Doc/Section.php

    r2624 r2963  
    4040     */ 
    4141    private $_name; 
    42      
     42 
    4343    /** 
    4444     * The index of this section among the subsections of its parent. The index  
     
    4848     */ 
    4949    private $_index; 
    50      
     50 
    5151    /** 
    5252     * Array containing the subsections of this section. 
     
    5555     */ 
    5656    private $_children = array(); 
    57      
     57 
    5858    /** 
    5959     * The parent of this section. 
     
    6262     */ 
    6363    private $_parent; 
    64      
     64 
    6565    /** 
    6666     * Level of this section in section hierarchy. 
     
    6969     */ 
    7070    private $_level = 0; 
    71      
     71 
    7272    /** 
    7373     * Text contents of this section. 
     
    9494        } 
    9595    } 
    96      
     96 
    9797    /** 
    9898     * Adds a subsection to this section. 
     
    105105        $this->_children[] = $child; 
    106106    } 
    107      
     107 
    108108    /** 
    109109     * Returns the index of this section. 
     
    120120        } 
    121121    } 
    122      
     122 
    123123    /** 
    124124     * Returns the path of this section. 
     
    135135        } 
    136136    } 
    137      
     137 
    138138    /** 
    139139     * Returns the name of this section. 
     
    151151        } 
    152152    } 
    153      
     153 
    154154    /** 
    155155     * Returns how many subsections this section has. 
     
    161161        return count($this->_children); 
    162162    } 
    163      
     163 
    164164    /** 
    165165     * Returns the subsection that has the given index. 
     
    175175        return $this->_children[$index]; 
    176176    } 
    177      
     177 
    178178    /** 
    179179     * Returns the parent of this section. 
     
    189189        } 
    190190    } 
    191      
     191 
    192192    /** 
    193193     * Returns the next section. 
     
    218218        } else { 
    219219             
    220             if ((!$maxLevel || ($this->_level < $maxLevel)) 
     220            if (( ! $maxLevel || ($this->_level < $maxLevel)) 
    221221                && (count($this) > 0)) { 
    222222                return $this->getChild(0); 
    223223            } 
    224224             
    225             if ((!$maxLevel || ($this->_level <= $maxLevel) ) 
     225            if (( ! $maxLevel || ($this->_level <= $maxLevel) ) 
    226226                && ($this->_index < count($this->_parent) - 1)) { 
    227227                return $this->_parent->getChild($this->_index + 1); 
     
    232232        } 
    233233    } 
    234      
     234 
    235235    /** 
    236236     * Returns the previous section. 
     
    255255        } 
    256256    } 
    257      
     257 
    258258    /** 
    259259     * Finds the last child or grand child of this section. 
     
    268268    public function findLastChild($maxLevel = 0) 
    269269    { 
    270         if ((!$maxLevel || $this->_level < $maxLevel) && count($this) > 0) { 
     270        if (( ! $maxLevel || $this->_level < $maxLevel) && count($this) > 0) { 
    271271            return $this->getChild(count($this) - 1)->findLastChild(); 
    272272        } else { 
     
    274274        } 
    275275    } 
    276      
     276 
    277277    /** 
    278278     * Returns true, if this section is the root section. 
     
    284284        return $this->_parent === null; 
    285285    } 
    286      
     286 
    287287    /** 
    288288     * Returns the level of this section in section hierarchy. 
     
    294294        return $this->_level; 
    295295    } 
    296      
     296 
    297297    /** 
    298298     * Returns the text contents of this section. 
     
    326326                        // The current section did not have any text in this file. 
    327327                        // Let's assume that the text is defined in another file. 
    328                         if (!$current->isRoot() && $current->_text === '') { 
     328                        if ( ! $current->isRoot() && $current->_text === '') { 
    329329                             
    330330                            $otherFilename = $current->getPath(false, DIRECTORY_SEPARATOR) . '.txt'; 
     
    371371        // The last section did not have any text in this file. 
    372372            // Let's assume that the text is defined in another file. 
    373             if (!$current->isRoot() && $current->_text === '') { 
     373            if ( ! $current->isRoot() && $current->_text === '') { 
    374374 
    375375                $otherFilename = $current->getPath(false, DIRECTORY_SEPARATOR) . '.txt'; 
  • trunk/vendor/Sensei/Sensei/Doc/Toc.php

    r1651 r2963  
    5353        $this->_toc->parse(dirname($filename), basename($filename)); 
    5454    } 
    55      
     55 
    5656    /** 
    5757     * Finds the section that matches the given path. 
     
    109109        return $currentSection; 
    110110    } 
    111      
     111 
    112112    /** 
    113113     * Returns a root section with the given index. 
     
    120120        return $this->_toc->getChild($index); 
    121121    } 
    122      
     122 
    123123    /** 
    124124     * Returns the number of sections (excluding their subsections). 
  • trunk/vendor/spikephpcoverage/cli/driver.php

    r2847 r2963  
    1919    */ 
    2020 
    21     if(!defined("__PHPCOVERAGE_HOME")) { 
     21    if( ! defined("__PHPCOVERAGE_HOME")) { 
    2222        define("__PHPCOVERAGE_HOME", dirname(dirname(__FILE__))); 
    2323    } 
     
    149149    $excludePaths = array(); 
    150150 
    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']) { 
    153153            echo "ERROR: No --cov-url option specified.\n"; 
    154154            exit(1); 
     
    157157 
    158158    if($OPTION['init']) { 
    159         if(!$OPTION['tmp-dir']) { 
     159        if( ! $OPTION['tmp-dir']) { 
    160160            $OPTION['tmp-dir'] = $util->getTmpDir(); 
    161161        } 
    162         if(!$OPTION['cov-file-name']) { 
     162        if( ! $OPTION['cov-file-name']) { 
    163163            $OPTION['cov-file-name'] = "phpcoverage.data.xml"; 
    164164        } 
     
    166166 
    167167    if($OPTION['report']) { 
    168         if (!$OPTION['report-name']){ 
     168        if ( ! $OPTION['report-name']){ 
    169169            echo "ERROR: No --report-name option specified.\n"; 
    170170            exit(1); 
    171171        } 
    172172 
    173         if(!$OPTION['report-dir']) { 
    174             if(!empty($PHPCOVERAGE_REPORT_DIR)) { 
     173        if( ! $OPTION['report-dir']) { 
     174            if( ! empty($PHPCOVERAGE_REPORT_DIR)) { 
    175175                $OPTION["report-dir"] = $PHPCOVERAGE_REPORT_DIR; 
    176176            } 
     
    226226            $OPTION['cov-data-fileset'] = explode(",", $OPTION['cov-data-files']); 
    227227            foreach($OPTION['cov-data-fileset'] as $covDataFile) { 
    228                 if(!is_readable($covDataFile)) { 
     228                if( ! is_readable($covDataFile)) { 
    229229                    echo "Error: Cannot read cov-data-file: " . $covDataFile . "\n"; 
    230230                    exit(1); 
  • trunk/vendor/spikephpcoverage/cli/instrument.php

    r2847 r2963  
    1111    #!/bin/php 
    1212 
    13     if(!defined("__PHPCOVERAGE_HOME")) { 
     13    if( ! defined("__PHPCOVERAGE_HOME")) { 
    1414        define("__PHPCOVERAGE_HOME", dirname(dirname(__FILE__))); 
    1515    } 
     
    8282 
    8383        $fp = fopen($tmpfile, "w"); 
    84         if(!$fp) { 
     84        if( ! $fp) { 
    8585            error("Cannot write to file: $tmpfile"); 
    8686        } 
     
    9494        } 
    9595        $ret = rename($tmpfile, $file); 
    96         if(!$ret) { 
     96        if( ! $ret) { 
    9797            error("Cannot save file: $file"); 
    9898        } 
     
    119119        $fr = fopen($file, "r"); 
    120120        $fw = fopen($tmpfile, "w"); 
    121         if(!$fr) { 
     121        if( ! $fr) { 
    122122            error("Cannot read file: $file"); 
    123123        } 
    124         if(!$fr) { 
     124        if( ! $fr) { 
    125125            error("Cannot write to file: $tmpfile"); 
    126126        } 
    127         while(!feof($fr)) { 
     127        while( ! feof($fr)) { 
    128128            $line = fgets($fr); 
    129129            if(strpos($line, $top) === false && strpos($line, $bottom) === false) { 
     
    139139        } 
    140140        $ret = rename($tmpfile, $file); 
    141         if(!$ret) { 
     141        if( ! $ret) { 
    142142            error("Cannot save file: $file"); 
    143143        } 
     
    159159        while(count($dirs) > 0) { 
    160160            $currDir = realpath(array_pop($dirs)); 
    161             if(!is_readable($currDir)) { 
     161            if( ! is_readable($currDir)) { 
    162162                continue; 
    163163            } 
     
    237237 
    238238 
    239     if(!is_dir($LOCAL_PHPCOVERAGE_LOCATION)) { 
     239    if( ! is_dir($LOCAL_PHPCOVERAGE_LOCATION)) { 
    240240        error("LOCAL_PHPCOVERAGE_LOCATION [$LOCAL_PHPCOVERAGE_LOCATION] not found."); 
    241241    } 
     
    252252    } 
    253253    $ret = copy($PHPCOVERAGE_HOME . $top_file, $LOCAL_PHPCOVERAGE_LOCATION . $top_file); 
    254     if(!$ret) { 
     254    if( ! $ret) { 
    255255        error("Cannot copy to $LOCAL_PHPCOVERAGE_LOCATION"); 
    256256    } 
     
    259259    } 
    260260    $ret = copy($PHPCOVERAGE_HOME . $bottom_file, $LOCAL_PHPCOVERAGE_LOCATION . $bottom_file); 
    261     if(!$ret) { 
     261    if( ! $ret) { 
    262262        error("Cannot copy to $LOCAL_PHPCOVERAGE_LOCATION"); 
    263263    } 
     
    268268        $paths[] = getcwd(); 
    269269    } 
    270     if(!isset($EXCLUDE_FILES) || empty($EXCLUDE_FILES)) { 
     270    if( ! isset($EXCLUDE_FILES) || empty($EXCLUDE_FILES)) { 
    271271        $EXCLUDE_FILES = array(); 
    272272    } 
    273273    for($i = 0; $i < count($EXCLUDE_FILES); $i++) { 
    274274        // 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])) { 
    276276            array_splice($EXCLUDE_FILES, $i, 1); 
    277277            $i --; 
  • trunk/vendor/spikephpcoverage/CoverageRecorder.php

    r2847 r2963  
    1010<?php 
    1111 
    12     if(!defined("__PHPCOVERAGE_HOME")) { 
     12    if( ! defined("__PHPCOVERAGE_HOME")) { 
    1313        define("__PHPCOVERAGE_HOME", dirname(__FILE__)); 
    1414    } 
     
    169169        protected function removeAbsentPaths(&$dirs) { 
    170170            for($i = 0; $i < count($dirs); $i++) { 
    171                 if(! file_exists($dirs[$i])) { 
     171                if( ! file_exists($dirs[$i])) { 
    172172                    // echo "Not found: " . $dirs[$i] . "\n"; 
    173173                    $this->errors[] = "Not found: " . $dirs[$i]  
     
    212212            while(count($dirs) > 0) { 
    213213                $currDir = realpath(array_pop($dirs)); 
    214                 if(!is_readable($currDir)) { 
     214                if( ! is_readable($currDir)) { 
    215215                    continue; 
    216216                } 
     
    272272                    } 
    273273                } 
    274                 if(!array_key_exists($files[$i], $this->coverageData)) { 
     274                if( ! array_key_exists($files[$i], $this->coverageData)) { 
    275275                    $this->coverageData[$files[$i]] =  array(); 
    276276                } 
  • trunk/vendor/spikephpcoverage/parser/BasicXmlParser.php