summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Perry <matt@mattperry.com>2013-08-23 02:41:39 -0700
committerMatt Perry <matt@mattperry.com>2013-08-23 02:41:39 -0700
commit0ea51e63908793de4c5d5fa2b4d82c2769fec559 (patch)
tree4576ef707d6170daf923cfe6f476af9204dc7e62
parent403ad0ff241a88ebf7ae9ef4365b484e82069e78 (diff)
downloadrpg-0ea51e63908793de4c5d5fa2b4d82c2769fec559.tar.gz
rpg-0ea51e63908793de4c5d5fa2b4d82c2769fec559.tar.bz2
Fix CodeSniffer violations for PHP files
Fix violations for Generic.PHP.LowerCaseConstant.Found
-rwxr-xr-xbin/wantedpages.php2
-rw-r--r--inc/parser/code.php4
-rw-r--r--inc/parser/handler.php28
-rw-r--r--inc/parser/metadata.php24
-rw-r--r--inc/parser/renderer.php32
-rw-r--r--inc/parser/xhtml.php30
-rw-r--r--inc/subscription.php4
-rw-r--r--lib/plugins/config/admin.php2
-rw-r--r--lib/plugins/config/settings/extra.class.php2
-rw-r--r--lib/plugins/plugin/admin.php4
-rw-r--r--lib/plugins/plugin/classes/ap_info.class.php2
-rw-r--r--lib/plugins/plugin/classes/ap_manage.class.php2
-rw-r--r--lib/plugins/revert/admin.php2
13 files changed, 69 insertions, 69 deletions
diff --git a/bin/wantedpages.php b/bin/wantedpages.php
index 16ff32b72..afcb6b271 100755
--- a/bin/wantedpages.php
+++ b/bin/wantedpages.php
@@ -49,7 +49,7 @@ function dw_dir_filter($entry, $basepath) {
#------------------------------------------------------------------------------
function dw_get_pages($dir) {
- static $trunclen = NULL;
+ static $trunclen = null;
if ( !$trunclen ) {
global $conf;
$trunclen = strlen($conf['datadir'].':');
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;
diff --git a/inc/subscription.php b/inc/subscription.php
index 4248e4b11..ecbc9ef19 100644
--- a/inc/subscription.php
+++ b/inc/subscription.php
@@ -617,7 +617,7 @@ class Subscription {
* @param string $rev The revision of the page, set to the current revision of the page $id if not set
* @return string
*/
- protected function getMessageID($id, $rev = NULL) {
+ protected function getMessageID($id, $rev = null) {
static $listid = null;
if (is_null($listid)) {
$server = parse_url(DOKU_URL, PHP_URL_HOST);
@@ -694,4 +694,4 @@ class Subscription {
function subscription_addresslist(&$data) {
$sub = new Subscription();
$sub->notifyaddresses($data);
-} \ No newline at end of file
+}
diff --git a/lib/plugins/config/admin.php b/lib/plugins/config/admin.php
index 404560548..835d27775 100644
--- a/lib/plugins/config/admin.php
+++ b/lib/plugins/config/admin.php
@@ -52,7 +52,7 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin {
$this->_input = $INPUT->arr('config');
while (list($key) = each($this->_config->setting)) {
- $input = isset($this->_input[$key]) ? $this->_input[$key] : NULL;
+ $input = isset($this->_input[$key]) ? $this->_input[$key] : null;
if ($this->_config->setting[$key]->update($input)) {
$this->_changed = true;
}
diff --git a/lib/plugins/config/settings/extra.class.php b/lib/plugins/config/settings/extra.class.php
index 954178bc1..d0f99fa8f 100644
--- a/lib/plugins/config/settings/extra.class.php
+++ b/lib/plugins/config/settings/extra.class.php
@@ -8,7 +8,7 @@
if (!class_exists('setting_sepchar')) {
class setting_sepchar extends setting_multichoice {
- function setting_sepchar($key,$param=NULL) {
+ function setting_sepchar($key,$param=null) {
$str = '_-.';
for ($i=0;$i<strlen($str);$i++) $this->_choices[] = $str{$i};
diff --git a/lib/plugins/plugin/admin.php b/lib/plugins/plugin/admin.php
index de4de6aef..72c58620d 100644
--- a/lib/plugins/plugin/admin.php
+++ b/lib/plugins/plugin/admin.php
@@ -37,7 +37,7 @@ class admin_plugin_plugin extends DokuWiki_Admin_Plugin {
/**
* @var ap_manage
*/
- var $handler = NULL;
+ var $handler = null;
var $functions = array('delete','update',/*'settings',*/'info'); // require a plugin name
var $commands = array('manage','download','enable'); // don't require a plugin name
@@ -109,7 +109,7 @@ class admin_plugin_plugin extends DokuWiki_Admin_Plugin {
$this->setupLocale();
$this->_get_plugin_list();
- if ($this->handler === NULL) $this->handler = new ap_manage($this, $this->plugin);
+ if ($this->handler === null) $this->handler = new ap_manage($this, $this->plugin);
ptln('<div id="plugin__manager">');
$this->handler->html();
diff --git a/lib/plugins/plugin/classes/ap_info.class.php b/lib/plugins/plugin/classes/ap_info.class.php
index 44926c035..dfeb52b9d 100644
--- a/lib/plugins/plugin/classes/ap_info.class.php
+++ b/lib/plugins/plugin/classes/ap_info.class.php
@@ -15,7 +15,7 @@ class ap_info extends ap_manage {
foreach ($component_list as $component) {
- if (($obj = &plugin_load($component['type'],$component['name'],false,true)) === NULL) continue;
+ if (($obj = &plugin_load($component['type'],$component['name'],false,true)) === null) continue;
$compname = explode('_',$component['name']);
if($compname[1]){
diff --git a/lib/plugins/plugin/classes/ap_manage.class.php b/lib/plugins/plugin/classes/ap_manage.class.php
index 3ec740dae..48be63050 100644
--- a/lib/plugins/plugin/classes/ap_manage.class.php
+++ b/lib/plugins/plugin/classes/ap_manage.class.php
@@ -2,7 +2,7 @@
class ap_manage {
- var $manager = NULL;
+ var $manager = null;
var $lang = array();
var $plugin = '';
var $downloaded = array();
diff --git a/lib/plugins/revert/admin.php b/lib/plugins/revert/admin.php
index beff10ced..b65472e4c 100644
--- a/lib/plugins/revert/admin.php
+++ b/lib/plugins/revert/admin.php
@@ -157,7 +157,7 @@ class admin_plugin_revert extends DokuWiki_Admin_Plugin {
echo "<img $att />";
echo '</a> ';
- echo html_wikilink(':'.$recent['id'],(useHeading('navigation'))?NULL:$recent['id']);
+ echo html_wikilink(':'.$recent['id'],(useHeading('navigation'))?null:$recent['id']);
echo ' – '.htmlspecialchars($recent['sum']);
echo ' <span class="user">';