diff options
author | Andreas Gohr <andi@splitbrain.org> | 2023-09-02 14:42:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-02 14:42:51 +0200 |
commit | 5ff5424d8c81c7123d8656a787af2ff85b3dec21 (patch) | |
tree | 322929ee01d892bb3c927e7fe1238369c647f820 /inc/Extension/AdminPlugin.php | |
parent | 0613df3287b82a98b1e97cf86ed9d4c8fbd16f1c (diff) | |
parent | 91560755291852b8302767d454183a7662666f7e (diff) | |
download | dokuwiki-5ff5424d8c81c7123d8656a787af2ff85b3dec21.tar.gz dokuwiki-5ff5424d8c81c7123d8656a787af2ff85b3dec21.zip |
Merge pull request #4045 from dokuwiki/autofix
Use Rector to autofix code smell
Diffstat (limited to 'inc/Extension/AdminPlugin.php')
-rw-r--r-- | inc/Extension/AdminPlugin.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/inc/Extension/AdminPlugin.php b/inc/Extension/AdminPlugin.php index 7900a1ec4..099a83623 100644 --- a/inc/Extension/AdminPlugin.php +++ b/inc/Extension/AdminPlugin.php @@ -12,7 +12,6 @@ namespace dokuwiki\Extension; */ abstract class AdminPlugin extends Plugin { - /** * Return the text that is displayed at the main admin menu * (Default localized language string 'menu' is returned, override this function for setting another name) @@ -78,13 +77,14 @@ abstract class AdminPlugin extends Plugin * * @return bool true if the current user may access this admin plugin */ - public function isAccessibleByCurrentUser() { + public function isAccessibleByCurrentUser() + { $data = []; $data['instance'] = $this; $data['hasAccess'] = false; $event = new Event('ADMINPLUGIN_ACCESS_CHECK', $data); - if($event->advise_before()) { + if ($event->advise_before()) { if ($this->forAdminOnly()) { $data['hasAccess'] = auth_isadmin(); } else { @@ -116,8 +116,6 @@ abstract class AdminPlugin extends Plugin */ public function getTOC() { - return array(); + return []; } - } - |