diff options
author | Andreas Gohr <andi@splitbrain.org> | 2013-08-23 05:55:10 -0700 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2013-08-23 05:55:10 -0700 |
commit | e5f74061b4adda0d5dd9d97671ed4465c0f7e9a0 (patch) | |
tree | d75a5c6789a49d4194c70447205565a4095e7771 /inc/parser | |
parent | 7522b126516bae336fe9e639cff985c16dad16cc (diff) | |
parent | 0ea51e63908793de4c5d5fa2b4d82c2769fec559 (diff) | |
download | rpg-e5f74061b4adda0d5dd9d97671ed4465c0f7e9a0.tar.gz rpg-e5f74061b4adda0d5dd9d97671ed4465c0f7e9a0.tar.bz2 |
Merge pull request #315 from mperry2/cs-code
Fix CodeSniffer violations for Generic.PHP.LowerCaseConstant.Found
Diffstat (limited to 'inc/parser')
-rw-r--r-- | inc/parser/code.php | 4 | ||||
-rw-r--r-- | inc/parser/handler.php | 28 | ||||
-rw-r--r-- | inc/parser/metadata.php | 24 | ||||
-rw-r--r-- | inc/parser/renderer.php | 32 | ||||
-rw-r--r-- | inc/parser/xhtml.php | 30 |
5 files changed, 59 insertions, 59 deletions
diff --git a/inc/parser/code.php b/inc/parser/code.php index 6e159b041..0b8e3ee02 100644 --- a/inc/parser/code.php +++ b/inc/parser/code.php @@ -15,7 +15,7 @@ class Doku_Renderer_code extends Doku_Renderer { * * When the correct block was found it exits the script. */ - function code($text, $language = NULL, $filename='' ) { + function code($text, $language = null, $filename='' ) { global $INPUT; if(!$language) $language = 'txt'; if(!$filename) $filename = 'snippet.'.$language; @@ -36,7 +36,7 @@ class Doku_Renderer_code extends Doku_Renderer { /** * Wraps around code() */ - function file($text, $language = NULL, $filename='') { + function file($text, $language = null, $filename='') { $this->code($text, $language, $filename); } diff --git a/inc/parser/handler.php b/inc/parser/handler.php index b2d0f9df4..6e6cca1a9 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -4,9 +4,9 @@ if (!defined('DOKU_PARSER_EOL')) define('DOKU_PARSER_EOL',"\n"); // add this t class Doku_Handler { - var $Renderer = NULL; + var $Renderer = null; - var $CallWriter = NULL; + var $CallWriter = null; var $calls = array(); @@ -423,7 +423,7 @@ class Doku_Handler { // Split title from URL $link = explode('|',$link,2); if ( !isset($link[1]) ) { - $link[1] = NULL; + $link[1] = null; } else if ( preg_match('/^\{\{[^\}]+\}\}$/',$link[1]) ) { // If the title is an image, convert it to an array containing the image details $link[1] = Doku_Handler_Parse_Media($link[1]); @@ -481,12 +481,12 @@ class Doku_Handler { } function filelink($match, $state, $pos) { - $this->_addCall('filelink',array($match, NULL), $pos); + $this->_addCall('filelink',array($match, null), $pos); return true; } function windowssharelink($match, $state, $pos) { - $this->_addCall('windowssharelink',array($match, NULL), $pos); + $this->_addCall('windowssharelink',array($match, null), $pos); return true; } @@ -550,7 +550,7 @@ class Doku_Handler { function emaillink($match, $state, $pos) { $email = preg_replace(array('/^</','/>$/'),'',$match); - $this->_addCall('emaillink',array($email, NULL), $pos); + $this->_addCall('emaillink',array($email, null), $pos); return true; } @@ -631,12 +631,12 @@ function Doku_Handler_Parse_Media($match) { } else if ( $lalign ) { $align = 'left'; } else { - $align = NULL; + $align = null; } // The title... if ( !isset($link[1]) ) { - $link[1] = NULL; + $link[1] = null; } //remove aligning spaces @@ -654,11 +654,11 @@ function Doku_Handler_Parse_Media($match) { //parse width and height if(preg_match('#(\d+)(x(\d+))?#i',$param,$size)){ - ($size[1]) ? $w = $size[1] : $w = NULL; - ($size[3]) ? $h = $size[3] : $h = NULL; + ($size[1]) ? $w = $size[1] : $w = null; + ($size[3]) ? $h = $size[3] : $h = null; } else { - $w = NULL; - $h = NULL; + $w = null; + $h = null; } //get linking command @@ -1247,12 +1247,12 @@ class Doku_Handler_Table { } $this->tableCalls[] = array($this->lastCellType.'_close',array(),$call[2]); - $this->tableCalls[] = array($call[0].'_open',array(1,NULL,1),$call[2]); + $this->tableCalls[] = array($call[0].'_open',array(1,null,1),$call[2]); $this->lastCellType = $call[0]; } else { - $this->tableCalls[] = array($call[0].'_open',array(1,NULL,1),$call[2]); + $this->tableCalls[] = array($call[0].'_open',array(1,null,1),$call[2]); $this->lastCellType = $call[0]; $this->firstCell = false; diff --git a/inc/parser/metadata.php b/inc/parser/metadata.php index 2d9da823d..094c3ad05 100644 --- a/inc/parser/metadata.php +++ b/inc/parser/metadata.php @@ -221,7 +221,7 @@ class Doku_Renderer_metadata extends Doku_Renderer { } } - function code($text, $language = NULL, $file = null){ + function code($text, $language = null, $file = null){ if ($this->capture){ $this->doc .= DOKU_LF.$text; if (strlen($this->doc) > 250) $this->capture = false; @@ -274,12 +274,12 @@ class Doku_Renderer_metadata extends Doku_Renderer { $this->internallink($link, $link); } - function locallink($hash, $name = NULL){} + function locallink($hash, $name = null){} /** * keep track of internal links in $this->meta['relation']['references'] */ - function internallink($id, $name = NULL){ + function internallink($id, $name = null){ global $ID; if(is_array($name)) { @@ -311,7 +311,7 @@ class Doku_Renderer_metadata extends Doku_Renderer { } } - function externallink($url, $name = NULL){ + function externallink($url, $name = null){ if(is_array($name)) { $this->_firstimage($name['src']); if ($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']); @@ -322,7 +322,7 @@ class Doku_Renderer_metadata extends Doku_Renderer { } } - function interwikilink($match, $name = NULL, $wikiName, $wikiUri){ + function interwikilink($match, $name = null, $wikiName, $wikiUri){ if(is_array($name)) { $this->_firstimage($name['src']); if ($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']); @@ -335,7 +335,7 @@ class Doku_Renderer_metadata extends Doku_Renderer { } } - function windowssharelink($url, $name = NULL){ + function windowssharelink($url, $name = null){ if(is_array($name)) { $this->_firstimage($name['src']); if ($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']); @@ -347,7 +347,7 @@ class Doku_Renderer_metadata extends Doku_Renderer { } } - function emaillink($address, $name = NULL){ + function emaillink($address, $name = null){ if(is_array($name)) { $this->_firstimage($name['src']); if ($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']); @@ -359,15 +359,15 @@ class Doku_Renderer_metadata extends Doku_Renderer { } } - function internalmedia($src, $title=NULL, $align=NULL, $width=NULL, - $height=NULL, $cache=NULL, $linking=NULL){ + function internalmedia($src, $title=null, $align=null, $width=null, + $height=null, $cache=null, $linking=null){ if ($this->capture && $title) $this->doc .= '['.$title.']'; $this->_firstimage($src); $this->_recordMediaUsage($src); } - function externalmedia($src, $title=NULL, $align=NULL, $width=NULL, - $height=NULL, $cache=NULL, $linking=NULL){ + function externalmedia($src, $title=null, $align=null, $width=null, + $height=null, $cache=null, $linking=null){ if ($this->capture && $title) $this->doc .= '['.$title.']'; $this->_firstimage($src); } @@ -427,7 +427,7 @@ class Doku_Renderer_metadata extends Doku_Renderer { * * @author Harry Fuecks <hfuecks@gmail.com> */ - function _getLinkTitle($title, $default, $id=NULL) { + function _getLinkTitle($title, $default, $id=null) { global $conf; $isImage = false; diff --git a/inc/parser/renderer.php b/inc/parser/renderer.php index 4f99c668d..c697e990c 100644 --- a/inc/parser/renderer.php +++ b/inc/parser/renderer.php @@ -203,42 +203,42 @@ class Doku_Renderer extends DokuWiki_Plugin { // $link like 'SomePage' function camelcaselink($link) {} - function locallink($hash, $name = NULL) {} + function locallink($hash, $name = null) {} // $link like 'wiki:syntax', $title could be an array (media) - function internallink($link, $title = NULL) {} + function internallink($link, $title = null) {} // $link is full URL with scheme, $title could be an array (media) - function externallink($link, $title = NULL) {} + function externallink($link, $title = null) {} function rss ($url,$params) {} // $link is the original link - probably not much use // $wikiName is an indentifier for the wiki // $wikiUri is the URL fragment to append to some known URL - function interwikilink($link, $title = NULL, $wikiName, $wikiUri) {} + function interwikilink($link, $title = null, $wikiName, $wikiUri) {} // Link to file on users OS, $title could be an array (media) - function filelink($link, $title = NULL) {} + function filelink($link, $title = null) {} // Link to a Windows share, , $title could be an array (media) - function windowssharelink($link, $title = NULL) {} + function windowssharelink($link, $title = null) {} -// function email($address, $title = NULL) {} - function emaillink($address, $name = NULL) {} +// function email($address, $title = null) {} + function emaillink($address, $name = null) {} - function internalmedia ($src, $title=NULL, $align=NULL, $width=NULL, - $height=NULL, $cache=NULL, $linking=NULL) {} + function internalmedia ($src, $title=null, $align=null, $width=null, + $height=null, $cache=null, $linking=null) {} - function externalmedia ($src, $title=NULL, $align=NULL, $width=NULL, - $height=NULL, $cache=NULL, $linking=NULL) {} + function externalmedia ($src, $title=null, $align=null, $width=null, + $height=null, $cache=null, $linking=null) {} function internalmedialink ( - $src,$title=NULL,$align=NULL,$width=NULL,$height=NULL,$cache=NULL + $src,$title=null,$align=null,$width=null,$height=null,$cache=null ) {} function externalmedialink( - $src,$title=NULL,$align=NULL,$width=NULL,$height=NULL,$cache=NULL + $src,$title=null,$align=null,$width=null,$height=null,$cache=null ) {} function table_open($maxcols = null, $numrows = null, $pos = null){} @@ -249,11 +249,11 @@ class Doku_Renderer extends DokuWiki_Plugin { function tablerow_close(){} - function tableheader_open($colspan = 1, $align = NULL, $rowspan = 1){} + function tableheader_open($colspan = 1, $align = null, $rowspan = 1){} function tableheader_close(){} - function tablecell_open($colspan = 1, $align = NULL, $rowspan = 1){} + function tablecell_open($colspan = 1, $align = null, $rowspan = 1){} function tablecell_close(){} diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 84d837c08..a719bca26 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -547,7 +547,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { } - function locallink($hash, $name = NULL){ + function locallink($hash, $name = null){ global $ID; $name = $this->_getLinkTitle($name, $hash, $isImage); $hash = $this->_headerToLink($hash); @@ -565,7 +565,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { * * @author Andreas Gohr <andi@splitbrain.org> */ - function internallink($id, $name = NULL, $search=NULL,$returnonly=false,$linktype='content') { + function internallink($id, $name = null, $search=null,$returnonly=false,$linktype='content') { global $conf; global $ID; global $INFO; @@ -644,7 +644,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { } } - function externallink($url, $name = NULL) { + function externallink($url, $name = null) { global $conf; $name = $this->_getLinkTitle($name, $url, $isImage); @@ -687,7 +687,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { /** */ - function interwikilink($match, $name = NULL, $wikiName, $wikiUri) { + function interwikilink($match, $name = null, $wikiName, $wikiUri) { global $conf; $link = array(); @@ -721,7 +721,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { /** */ - function windowssharelink($url, $name = NULL) { + function windowssharelink($url, $name = null) { global $conf; global $lang; //simple setup @@ -747,7 +747,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $this->doc .= $this->_formatLink($link); } - function emaillink($address, $name = NULL) { + function emaillink($address, $name = null) { global $conf; //simple setup $link = array(); @@ -782,8 +782,8 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $this->doc .= $this->_formatLink($link); } - function internalmedia ($src, $title=NULL, $align=NULL, $width=NULL, - $height=NULL, $cache=NULL, $linking=NULL) { + function internalmedia ($src, $title=null, $align=null, $width=null, + $height=null, $cache=null, $linking=null) { global $ID; list($src,$hash) = explode('#',$src,2); resolve_mediaid(getNS($ID),$src, $exists); @@ -818,8 +818,8 @@ class Doku_Renderer_xhtml extends Doku_Renderer { else $this->doc .= $this->_formatLink($link); } - function externalmedia ($src, $title=NULL, $align=NULL, $width=NULL, - $height=NULL, $cache=NULL, $linking=NULL) { + function externalmedia ($src, $title=null, $align=null, $width=null, + $height=null, $cache=null, $linking=null) { list($src,$hash) = explode('#',$src,2); $noLink = false; $render = ($linking == 'linkonly') ? false : true; @@ -959,7 +959,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $this->doc .= DOKU_LF . DOKU_TAB . '</tr>' . DOKU_LF; } - function tableheader_open($colspan = 1, $align = NULL, $rowspan = 1){ + function tableheader_open($colspan = 1, $align = null, $rowspan = 1){ $class = 'class="col' . $this->_counter['cell_counter']++; if ( !is_null($align) ) { $class .= ' '.$align.'align'; @@ -980,7 +980,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $this->doc .= '</th>'; } - function tablecell_open($colspan = 1, $align = NULL, $rowspan = 1){ + function tablecell_open($colspan = 1, $align = null, $rowspan = 1){ $class = 'class="col' . $this->_counter['cell_counter']++; if ( !is_null($align) ) { $class .= ' '.$align.'align'; @@ -1046,8 +1046,8 @@ class Doku_Renderer_xhtml extends Doku_Renderer { * * @author Andreas Gohr <andi@splitbrain.org> */ - function _media ($src, $title=NULL, $align=NULL, $width=NULL, - $height=NULL, $cache=NULL, $render = true) { + function _media ($src, $title=null, $align=null, $width=null, + $height=null, $cache=null, $render = true) { $ret = ''; @@ -1149,7 +1149,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { * * @author Harry Fuecks <hfuecks@gmail.com> */ - function _getLinkTitle($title, $default, & $isImage, $id=NULL, $linktype='content') { + function _getLinkTitle($title, $default, & $isImage, $id=null, $linktype='content') { global $conf; $isImage = false; |