Skip to content

Commit

Permalink
Fix PHP strict warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
michitux committed Nov 24, 2013
1 parent 306441b commit 8611cb4
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion action.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function action_plugin_include() {
/**
* plugin should use this method to register its handlers with the dokuwiki's event controller
*/
function register(&$controller) {
function register(Doku_Event_Handler $controller) {
/* @var Doku_event_handler $controller */
$controller->register_hook('INDEXER_PAGE_ADD', 'BEFORE', $this, 'handle_indexer');
$controller->register_hook('INDEXER_VERSION_GET', 'BEFORE', $this, 'handle_indexer_version');
Expand Down
4 changes: 2 additions & 2 deletions syntax/closelastsecedit.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ function getSort() {
return 50;
}

function handle($match, $state, $pos, &$handler) {
function handle($match, $state, $pos, Doku_Handler &$handler) {
// this is a syntax plugin that doesn't offer any syntax, so there's nothing to handle by the parser
}

/**
* Finishes the last open section edit
*/
function render($mode, &$renderer, $data) {
function render($mode, Doku_Renderer &$renderer, $data) {
if ($mode == 'xhtml') {
/** @var Doku_Renderer_xhtml $renderer */
list($endpos) = $data;
Expand Down
4 changes: 2 additions & 2 deletions syntax/editbtn.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function getSort() {
return 50;
}

function handle($match, $state, $pos, &$handler) {
function handle($match, $state, $pos, Doku_Handler &$handler) {
// this is a syntax plugin that doesn't offer any syntax, so there's nothing to handle by the parser
}

Expand All @@ -31,7 +31,7 @@ function handle($match, $state, $pos, &$handler) {
*
* @author Michael Klier <chi@chimeric.de>
*/
function render($mode, &$renderer, $data) {
function render($mode, Doku_Renderer &$renderer, $data) {
list($title) = $data;
if ($mode == 'xhtml') {
$renderer->startSectionEdit(0, 'plugin_include_editbtn', $title);
Expand Down
4 changes: 2 additions & 2 deletions syntax/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function getSort() {
return 300;
}

function handle($match, $state, $pos, &$handler) {
function handle($match, $state, $pos, Doku_Handler &$handler) {
// this is a syntax plugin that doesn't offer any syntax, so there's nothing to handle by the parser
}

Expand All @@ -32,7 +32,7 @@ function handle($match, $state, $pos, &$handler) {
* Code heavily copied from the header renderer from inc/parser/xhtml.php, just
* added an href parameter to the anchor tag linking to the wikilink.
*/
function render($mode, &$renderer, $data) {
function render($mode, Doku_Renderer &$renderer, $data) {

list($page, $sect, $sect_title, $flags, $redirect_id, $footer_lvl) = $data;

Expand Down
4 changes: 2 additions & 2 deletions syntax/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function getSort() {
return 50;
}

function handle($match, $state, $pos, &$handler) {
function handle($match, $state, $pos, Doku_Handler &$handler) {
// this is a syntax plugin that doesn't offer any syntax, so there's nothing to handle by the parser
}

Expand All @@ -35,7 +35,7 @@ function handle($match, $state, $pos, &$handler) {
* Code heavily copied from the header renderer from inc/parser/xhtml.php, just
* added an href parameter to the anchor tag linking to the wikilink.
*/
function render($mode, &$renderer, $data) {
function render($mode, Doku_Renderer &$renderer, $data) {
global $conf;

list($headline, $lvl, $pos, $page, $sect, $flags) = $data;
Expand Down
6 changes: 3 additions & 3 deletions syntax/include.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function connectTo($mode) {
* @param Doku_Handler $handler The hanlder object
* @return array The instructions of the plugin
*/
function handle($match, $state, $pos, &$handler) {
function handle($match, $state, $pos, Doku_Handler &$handler) {

$match = substr($match, 2, -2); // strip markup
list($match, $flags) = explode('&', $match, 2);
Expand All @@ -87,7 +87,7 @@ function handle($match, $state, $pos, &$handler) {
*
* @author Michael Hamann <michael@content-space.de>
*/
function render($format, &$renderer, $data) {
function render($format, Doku_Renderer &$renderer, $data) {
global $ID;

// static stack that records all ancestors of the child pages
Expand All @@ -102,7 +102,7 @@ function render($format, &$renderer, $data) {
list($mode, $page, $sect, $flags, $level, $pos) = $data;

if (!$this->helper)
$this->helper =& plugin_load('helper', 'include');
$this->helper = plugin_load('helper', 'include');
$flags = $this->helper->get_flags($flags);

$pages = $this->helper->_get_included_pages($mode, $page, $sect, $parent_id, $flags);
Expand Down
4 changes: 2 additions & 2 deletions syntax/locallink.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function getSort() {
return 50;
}

function handle($match, $state, $pos, &$handler) {
function handle($match, $state, $pos, Doku_Handler &$handler) {
// this is a syntax plugin that doesn't offer any syntax, so there's nothing to handle by the parser
}

Expand All @@ -27,7 +27,7 @@ function handle($match, $state, $pos, &$handler) {
*
* @author Michael Hamann <michael@content-space.de>
*/
function render($mode, &$renderer, $data) {
function render($mode, Doku_Renderer &$renderer, $data) {
global $ID;
if ($mode == 'xhtml') {
/** @var Doku_Renderer_xhtml $renderer */
Expand Down
4 changes: 2 additions & 2 deletions syntax/readmore.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ function getSort() {
return 50;
}

function handle($match, $state, $pos, &$handler) {
function handle($match, $state, $pos, Doku_Handler &$handler) {
// this is a syntax plugin that doesn't offer any syntax, so there's nothing to handle by the parser
}

function render($mode, &$renderer, $data) {
function render($mode, Doku_Renderer &$renderer, $data) {
list($page) = $data;

if ($mode == 'xhtml') {
Expand Down
4 changes: 2 additions & 2 deletions syntax/sorttag.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ public function connectTo($mode) {
/**
* Handle the match
*/
public function handle($match, $state, $pos, &$handler){
public function handle($match, $state, $pos, Doku_Handler &$handler){
$match = substr($match,12,-2);
return array($match);
}

/**
* Render output
*/
public function render($mode, &$renderer, $data) {
public function render($mode, Doku_Renderer &$renderer, $data) {
if ($mode === 'metadata') {
/** @var Doku_Renderer_metadata $renderer */
$renderer->meta['include_n'] = $data[0];
Expand Down
4 changes: 2 additions & 2 deletions syntax/wrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function getSort() {
return 50;
}

function handle($match, $state, $pos, &$handler) {
function handle($match, $state, $pos, Doku_Handler &$handler) {
// this is a syntax plugin that doesn't offer any syntax, so there's nothing to handle by the parser
}

Expand All @@ -30,7 +30,7 @@ function handle($match, $state, $pos, &$handler) {
* @author Michael Klier <chi@chimeric.de>
* @author Michael Hamann <michael@content-space.de>
*/
function render($mode, &$renderer, $data) {
function render($mode, Doku_Renderer &$renderer, $data) {
if ($mode == 'xhtml') {
list($state, $page, $redirect, $secid) = $data;
switch($state) {
Expand Down

0 comments on commit 8611cb4

Please sign in to comment.