Skip to content

Commit 9fe665e

Browse files
🤖 Rector and PHPCS fixes (#45)
Co-authored-by: mprins <[email protected]>
1 parent f707c68 commit 9fe665e

File tree

8 files changed

+266
-338
lines changed

8 files changed

+266
-338
lines changed

‎action.php

Lines changed: 73 additions & 118 deletions
Large diffs are not rendered by default.

‎admin/purge.php

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
<?php
2+
3+
use dokuwiki\Extension\AdminPlugin;
4+
25
/*
36
* Copyright (c) 2014 Mark C. Prins <[email protected]>
47
*
@@ -14,24 +17,25 @@
1417
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1518
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1619
*/
17-
1820
/**
1921
* DokuWiki Plugin spatialhelper (Admin Component).
2022
* This component purges and recreates the spatial index and sitemaps.
2123
*
2224
* @author Mark Prins
2325
*/
24-
class admin_plugin_spatialhelper_purge extends DokuWiki_Admin_Plugin {
25-
26+
class admin_plugin_spatialhelper_purge extends AdminPlugin
27+
{
2628
/**
2729
*
2830
* @see DokuWiki_Admin_Plugin::getMenuSort()
2931
*/
30-
public function getMenuSort(): int {
32+
public function getMenuSort(): int
33+
{
3134
return 801;
3235
}
3336

34-
public function getMenuIcon(): string {
37+
public function getMenuIcon(): string
38+
{
3539
$plugin = $this->getPluginName();
3640
return DOKU_PLUGIN . $plugin . '/admin/purge.svg';
3741
}
@@ -41,11 +45,12 @@ public function getMenuIcon(): string {
4145
*
4246
* @see DokuWiki_Admin_Plugin::handle()
4347
*/
44-
public function handle(): void {
45-
if(isset ($_REQUEST ['purgeindex'])) {
48+
public function handle(): void
49+
{
50+
if (isset($_REQUEST ['purgeindex'])) {
4651
global $conf;
4752
$path = $conf ['indexdir'] . '/spatial.idx';
48-
if(file_exists($path) && unlink($path)) {
53+
if (file_exists($path) && unlink($path)) {
4954
msg($this->getLang('admin_purged_tiles'), 0);
5055
}
5156
}
@@ -63,22 +68,21 @@ public function handle(): void {
6368
*
6469
* @see DokuWiki_Admin_Plugin::html()
6570
*/
66-
public function html(): void {
71+
public function html(): void
72+
{
6773
echo $this->locale_xhtml('admin_purge_intro');
6874

6975
$form = new Doku_Form(
70-
array(
71-
'id' => 'spatialhelper__purgeform',
72-
'method' => 'post'
73-
)
76+
['id' => 'spatialhelper__purgeform', 'method' => 'post']
7477
);
7578
$form->addHidden('purgeindex', 'true');
7679

7780
$form->addElement(
7881
form_makeButton(
79-
'submit', 'admin', $this->getLang('admin_submit'), array(
80-
'title' => $this->getLang('admin_submit')
81-
)
82+
'submit',
83+
'admin',
84+
$this->getLang('admin_submit'),
85+
['title' => $this->getLang('admin_submit')]
8286
)
8387
);
8488
$form->printForm();

‎conf/default.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/*
34
* Copyright (c) 2011-2017 Mark C. Prins <[email protected]>
45
*
@@ -21,6 +22,7 @@
2122
* @author Mark C. Prins
2223
* @license BSD license
2324
*/
25+
2426
$conf['media_kml'] = ':sitemap.kml';
2527
$conf['media_georss'] = ':sitemap.georss';
2628
$conf['sitemap_namespaces'] = '';

‎conf/metadata.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/*
34
* Copyright (c) 2011-2017 Mark C. Prins <[email protected]>
45
*
@@ -21,6 +22,7 @@
2122
* @author Mark C. Prins
2223
* @license BSD license
2324
*/
25+
2426
$meta ['media_kml'] = array('string');
2527
$meta ['media_georss'] = array('string');
2628
$meta ['sitemap_namespaces'] = array('');

0 commit comments

Comments
 (0)