Changeset 2963 for trunk/vendor/Text

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/Text
Files:
18 modified

Legend:

Unmodified
Added
Removed
  • trunk/vendor/Text/Wiki.php

    r2308 r2963  
    445445    { 
    446446        static $only = array(); 
    447         if (!isset($only[$parser])) { 
     447        if ( ! isset($only[$parser])) { 
    448448            $ret = & Text_Wiki::factory($parser, $rules); 
    449449            if (Text_Wiki::isError($ret)) { 
     
    470470        $class = 'Text_Wiki_' . $parser; 
    471471        $file = str_replace('_', '/', $class).'.php'; 
    472         if (!class_exists($class)) { 
     472        if ( ! class_exists($class)) { 
    473473            require_once $file; 
    474             if (!class_exists($class)) { 
     474            if ( ! class_exists($class)) { 
    475475                return Text_Wiki::error( 
    476476                    'Class ' . $class . ' does not exist after requiring '. $file . 
     
    504504        $rule = ucwords(strtolower($rule)); 
    505505 
    506         if (! isset($this->parseConf[$rule])) { 
     506        if ( ! isset($this->parseConf[$rule])) { 
    507507            $this->parseConf[$rule] = array(); 
    508508        } 
     
    540540 
    541541        // the rule does not exist 
    542         if (! isset($this->parseConf[$rule])) { 
     542        if ( ! isset($this->parseConf[$rule])) { 
    543543            return null; 
    544544        } 
     
    584584        $rule = ucwords(strtolower($rule)); 
    585585 
    586         if (! isset($this->renderConf[$format])) { 
     586        if ( ! isset($this->renderConf[$format])) { 
    587587            $this->renderConf[$format] = array(); 
    588588        } 
    589589 
    590         if (! isset($this->renderConf[$format][$rule])) { 
     590        if ( ! isset($this->renderConf[$format][$rule])) { 
    591591            $this->renderConf[$format][$rule] = array(); 
    592592        } 
     
    626626        $rule = ucwords(strtolower($rule)); 
    627627 
    628         if (! isset($this->renderConf[$format]) || 
     628        if ( ! isset($this->renderConf[$format]) || 
    629629            ! isset($this->renderConf[$format][$rule])) { 
    630630            return null; 
     
    665665    function setFormatConf($format, $arg1, $arg2 = null) 
    666666    { 
    667         if (! is_array($this->formatConf[$format])) { 
     667        if ( ! is_array($this->formatConf[$format])) { 
    668668            $this->formatConf[$format] = array(); 
    669669        } 
     
    700700    { 
    701701        // the format does not exist 
    702         if (! isset($this->formatConf[$format])) { 
     702        if ( ! isset($this->formatConf[$format])) { 
    703703            return null; 
    704704        } 
     
    740740    { 
    741741        $name = ucwords(strtolower($name)); 
    742         if (! is_null($tgt)) { 
     742        if ( ! is_null($tgt)) { 
    743743            $tgt = ucwords(strtolower($tgt)); 
    744744        } 
     
    753753        // in the list of rules. this means we're trying to insert after 
    754754        // a target key, but the target key isn't there. 
    755         if (! is_null($tgt) && $tgt != '' && 
     755        if ( ! is_null($tgt) && $tgt != '' && 
    756756            ! in_array($tgt, $this->rules)) { 
    757757            return false; 
     
    947947        foreach ($this->rules as $name) { 
    948948            // do not parse the rules listed in $disable 
    949             if (! in_array($name, $this->disable)) { 
     949            if ( ! in_array($name, $this->disable)) { 
    950950 
    951951                // load the parsing object 
     
    12281228        // will not reset to zero. 
    12291229        static $id; 
    1230         if (! isset($id)) { 
     1230        if ( ! isset($id)) { 
    12311231            $id = 0; 
    12321232        } else { 
     
    12421242            1 => $options 
    12431243        ); 
    1244         if (!isset($this->_countRulesTokens[$rule])) { 
     1244        if ( ! isset($this->_countRulesTokens[$rule])) { 
    12451245            $this->_countRulesTokens[$rule] = 1; 
    12461246        } else { 
     
    12881288        ); 
    12891289        if ($rule != $oldRule) { 
    1290             if (!($this->_countRulesTokens[$oldRule]--)) { 
     1290            if ( ! ($this->_countRulesTokens[$oldRule]--)) { 
    12911291                unset($this->_countRulesTokens[$oldRule]); 
    12921292            } 
    1293             if (!isset($this->_countRulesTokens[$rule])) { 
     1293            if ( ! isset($this->_countRulesTokens[$rule])) { 
    12941294                $this->_countRulesTokens[$rule] = 1; 
    12951295            } else { 
     
    13161316        $class = "Text_Wiki_Parse_$rule"; 
    13171317 
    1318         if (! class_exists($class)) { 
     1318        if ( ! class_exists($class)) { 
    13191319            $loc = $this->findFile('parse', $file); 
    13201320            if ($loc) { 
     
    13531353        $class = "Text_Wiki_Render_$format" . "_$rule"; 
    13541354 
    1355         if (! class_exists($class)) { 
     1355        if ( ! class_exists($class)) { 
    13561356            // load the class 
    13571357            $loc = $this->findFile('render', $file); 
     
    13871387        $class = "Text_Wiki_Render_$format"; 
    13881388 
    1389         if (! class_exists($class)) { 
     1389        if ( ! class_exists($class)) { 
    13901390            $loc = $this->findFile('render', $file); 
    13911391            if ($loc) { 
     
    14211421    { 
    14221422        $dir = $this->fixPath($dir); 
    1423         if (! isset($this->path[$type])) { 
     1423        if ( ! isset($this->path[$type])) { 
    14241424            $this->path[$type] = array($dir); 
    14251425        } else { 
     
    14461446        if (is_null($type)) { 
    14471447            return $this->path; 
    1448         } elseif (! isset($this->path[$type])) { 
     1448        } elseif ( ! isset($this->path[$type])) { 
    14491449            return array(); 
    14501450        } else { 
     
    15021502        $len = strlen($this->_dirSep); 
    15031503 
    1504         if (! empty($path) && 
     1504        if ( ! empty($path) && 
    15051505            substr($path, -1 * $len, $len) != $this->_dirSep)    { 
    15061506            return $path . $this->_dirSep; 
     
    15251525    function &error($message) 
    15261526    { 
    1527         if (! class_exists('PEAR_Error')) { 
     1527        if ( ! class_exists('PEAR_Error')) { 
    15281528            include_once 'PEAR.php'; 
    15291529        } 
  • trunk/vendor/Text/Wiki/Parse/Default/Center.php

    r1125 r2963  
    4747     
    4848    var $regex = '/\n\= (.*?)\n/'; 
    49      
     49 
    5050    /** 
    5151    *  
  • trunk/vendor/Text/Wiki/Parse/Default/Code.php

    r2015 r2963  
    5252/*    var $regex = '/^(\<code( .+)?\>)\n(.+)\n(\<\/code\>)(\s|$)/Umsi';*/ 
    5353    var $regex = ';^<code(\s[^>]*)?>((?:(?R)|.*?)*)\n</code>(\s|$);msi'; 
    54      
     54 
    5555    /** 
    5656    *  
     
    8383                 
    8484                // ... and make sure we have a 'type' 
    85                 if (! isset($attr['type'])) { 
     85                if ( ! isset($attr['type'])) { 
    8686                        $attr['type'] = ''; 
    8787                } 
  • trunk/vendor/Text/Wiki/Parse/Default/Freelink.php

    r2015 r2963  
    4545                       'utf-8' => false 
    4646    ); 
    47      
     47 
    4848    /** 
    4949    *  
  • trunk/vendor/Text/Wiki/Parse/Default/Heading.php

    r1125 r2963  
    5656        'id_prefix' => 'toc' 
    5757    ); 
    58      
     58 
    5959    /** 
    6060    *  
     
    7878        // when constructing TOC entries, etc. 
    7979        static $id; 
    80         if (! isset($id)) { 
     80        if ( ! isset($id)) { 
    8181            $id = 0; 
    8282        } 
  • trunk/vendor/Text/Wiki/Parse/Default/Image.php

    r1125 r2963  
    122122                // external url ? 
    123123                if (($pos = strpos($options['attr']['link'], '://')) !== false) { 
    124                     if (!preg_match($this->url, $options['attr']['link'])) { 
     124                    if ( ! preg_match($this->url, $options['attr']['link'])) { 
    125125                        return $matches[0]; 
    126126                    } 
  • trunk/vendor/Text/Wiki/Parse/Default/List.php

    r1125 r2963  
    187187            // add to the item count for this list (taking into account 
    188188            // which level we are at). 
    189             if (! isset($itemcount[$level])) { 
     189            if ( ! isset($itemcount[$level])) { 
    190190                // first count 
    191191                $itemcount[$level] = 0; 
     
    196196 
    197197            // is this the very first item in the list? 
    198             if (! $pastFirst) { 
     198            if ( ! $pastFirst) { 
    199199                $first = true; 
    200200                $pastFirst = true; 
  • trunk/vendor/Text/Wiki/Parse/Default/Wikilink.php

    r2015 r2963  
    8888        // build the regular expression for finding WikiPage names. 
    8989        $this->regex = 
    90             "(!?" .            // START WikiPage pattern (1) 
     90            "( ! ?" .            // START WikiPage pattern (1) 
    9191            "[$upper]" .       // 1 upper 
    9292            "[$either]*" .     // 0+ alpha or digit 
  • trunk/vendor/Text/Wiki/Render/Latex/Blockquote.php

    r1125 r2963  
    44     
    55    var $conf = array('css' => null); 
    6      
     6 
    77    /** 
    88    *  
  • trunk/vendor/Text/Wiki/Render/Latex/Colortext.php

    r1125 r2963  
    4343        $color = $options['color']; 
    4444         
    45         if (! in_array($color, $this->colors)) { 
     45        if ( ! in_array($color, $this->colors)) { 
    4646            $color = '#' . $color; 
    4747        } 
  • trunk/vendor/Text/Wiki/Render/Latex/Font.php

    r1125 r2963  
    4646        'huge' => 22, 
    4747        'Huge' => 9999); 
    48      
     48 
    4949    /** 
    5050      * Renders a token into text matching the requested format. 
  • trunk/vendor/Text/Wiki/Render/Latex/Image.php

    r1125 r2963  
    5757         
    5858        // always add an "alt" attribute per Stephane Solliec 
    59         if (! $alt) { 
     59        if ( ! $alt) { 
    6060            $attr .= ' alt="' . basename($options['src']) . '"'; 
    6161        } 
  • trunk/vendor/Text/Wiki/Render/Latex/Phplookup.php

    r1125 r2963  
    44     
    55    var $conf = array('target' => '_blank'); 
    6      
     6 
    77    /** 
    88    *  
  • trunk/vendor/Text/Wiki/Render/Plain/Phplookup.php

    r1125 r2963  
    44     
    55    var $conf = array('target' => '_blank'); 
    6      
     6 
    77    /** 
    88    *  
  • trunk/vendor/Text/Wiki/Render/Xhtml/Colortext.php

    r1125 r2963  
    6464        $color = $options['color']; 
    6565 
    66         if (! in_array($color, $this->colors) && $color{0} != '#') { 
     66        if ( ! in_array($color, $this->colors) && $color{0} != '#') { 
    6767            $color = '#' . $color; 
    6868        } 
  • trunk/vendor/Text/Wiki/Render/Xhtml/Image.php

    r2015 r2963  
    8686        if (isset($options['attr']['align'])) { 
    8787            // make sure we have a style attribute 
    88             if (!isset($options['attr']['style'])) { 
     88            if ( ! isset($options['attr']['style'])) { 
    8989                // no style, set up a blank one 
    9090                $options['attr']['style'] = ''; 
     
    110110        // stephane@metacites.net -- 25/07/2004 
    111111        // try to guess width and height 
    112         if (! isset($options['attr']['width']) && 
     112        if ( ! isset($options['attr']['width']) && 
    113113            ! isset($options['attr']['height'])) { 
    114114 
     
    163163 
    164164        // always add an "alt" attribute per Stephane Solliec 
    165         if (! $alt) { 
     165        if ( ! $alt) { 
    166166            $alt = $this->textEncode(basename($options['src'])); 
    167167            $output .= " alt=\"$alt\""; 
  • trunk/vendor/Text/Wiki/Render/Xhtml/Url.php

    r2015 r2963  
    6767 
    6868            // create alt text for the image 
    69             if (! isset($text) || $text == '') { 
     69            if ( ! isset($text) || $text == '') { 
    7070                $text = basename($href); 
    7171                $text = $this->textEncode($text); 
  • trunk/vendor/Text/Wiki/Render/Xhtml/Wikilink.php

    r2015 r2963  
    115115 
    116116            // set the proper HREF 
    117             if (! $href || trim($href) == '') { 
     117            if ( ! $href || trim($href) == '') { 
    118118 
    119119                // no useful href, return the text as it is 
     
    142142            // what kind of linking are we doing? 
    143143            $pos = $this->getConf('new_text_pos'); 
    144             if (! $pos || ! $new) { 
     144            if ( ! $pos || ! $new) { 
    145145                // no position (or no new_text), use css only on the page name 
    146146 
     
    157157            } 
    158158        } 
    159         if (!strlen($text)) { 
     159        if ( ! strlen($text)) { 
    160160            $start .= $this->textEncode($page); 
    161161        }