aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib/plugins/testing
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2023-09-02 14:42:51 +0200
committerGitHub <noreply@github.com>2023-09-02 14:42:51 +0200
commit5ff5424d8c81c7123d8656a787af2ff85b3dec21 (patch)
tree322929ee01d892bb3c927e7fe1238369c647f820 /lib/plugins/testing
parent0613df3287b82a98b1e97cf86ed9d4c8fbd16f1c (diff)
parent91560755291852b8302767d454183a7662666f7e (diff)
downloaddokuwiki-5ff5424d8c81c7123d8656a787af2ff85b3dec21.tar.gz
dokuwiki-5ff5424d8c81c7123d8656a787af2ff85b3dec21.zip
Merge pull request #4045 from dokuwiki/autofix
Use Rector to autofix code smell
Diffstat (limited to 'lib/plugins/testing')
-rw-r--r--lib/plugins/testing/action.php16
-rw-r--r--lib/plugins/testing/conf/default.php3
-rw-r--r--lib/plugins/testing/conf/metadata.php2
3 files changed, 14 insertions, 7 deletions
diff --git a/lib/plugins/testing/action.php b/lib/plugins/testing/action.php
index 09b84262e..48945c337 100644
--- a/lib/plugins/testing/action.php
+++ b/lib/plugins/testing/action.php
@@ -1,5 +1,7 @@
<?php
+use dokuwiki\Extension\ActionPlugin;
+use dokuwiki\Extension\EventHandler;
use dokuwiki\Extension\Event;
/**
@@ -9,16 +11,18 @@ use dokuwiki\Extension\Event;
*
* @author Tobias Sarnowski <tobias@trustedco.de>
*/
-class action_plugin_testing extends DokuWiki_Action_Plugin {
-
+class action_plugin_testing extends ActionPlugin
+{
/** @inheritdoc */
- public function register(Doku_Event_Handler $controller) {
+ public function register(EventHandler $controller)
+ {
$controller->register_hook('DOKUWIKI_STARTED', 'AFTER', $this, 'dokuwikiStarted');
}
- public function dokuwikiStarted() {
- $param = array();
+ public function dokuwikiStarted()
+ {
+ $param = [];
Event::createAndTrigger('TESTING_PLUGIN_INSTALLED', $param);
- msg('The testing plugin is enabled and should be disabled.',-1);
+ msg('The testing plugin is enabled and should be disabled.', -1);
}
}
diff --git a/lib/plugins/testing/conf/default.php b/lib/plugins/testing/conf/default.php
index 28aef9b7e..8ce3ce83b 100644
--- a/lib/plugins/testing/conf/default.php
+++ b/lib/plugins/testing/conf/default.php
@@ -1,9 +1,10 @@
<?php
+
/**
* Default options
*
* They don't do anything and are just there for testing config reading
*/
+
$conf['schnibble'] = 0;
$conf['second'] = 'Default value';
-
diff --git a/lib/plugins/testing/conf/metadata.php b/lib/plugins/testing/conf/metadata.php
index 3ea183cfa..09b6f143a 100644
--- a/lib/plugins/testing/conf/metadata.php
+++ b/lib/plugins/testing/conf/metadata.php
@@ -1,8 +1,10 @@
<?php
+
/**
* Option Metadata
*
* They don't do anything and are just there for testing config reading
*/
+
$meta['schnibble'] = array('onoff');
$meta['second'] = array('string');